mxdraw 0.1.95 → 0.1.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -1
- package/dist/lib/MxModule/MxType/MxType.js +1 -1
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/mxdraw.es5.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +7 -0
- package/dist/types/MxModule/MxType/MxType.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxType_1=require("../MxType"),store_1=require("../store/store"),MxDbEntity=function(){function t(){this.color=16777215,this.renderOrder=30,this.opacity=1,this.visible=!0,this.userData={},this.dLineWidth=0,this.lineWidthByPixels=!0,this.dDashArray=0,this.dDashRatio=0,this.layer=""}return t.prototype.dwgInHelp=function(t,e){var i=function(t){return t instanceof Array?r(t):"object"==typeof t?function(t){return!!(t.isVector3||t.isVector2||t.isVector4)}(t)?t.clone():2==t.datatype?new THREE.Vector2(t.x,t.y):3==t.datatype?new THREE.Vector3(t.x,t.y,t.z):4==t.datatype?new THREE.Vector4(t.x,t.y,t.z,t.w):o(t,Object.create(null)):t},r=function(t){return t.map(function(t){return i(t)})},o=function(t,e){for(var r in t)t[r]&&(e[r]=i(t[r]));return e},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxType_1=require("../MxType"),store_1=require("../store/store"),MxDbEntity=function(){function t(){this.color=16777215,this.renderOrder=30,this.opacity=1,this.visible=!0,this.userData={},this.sGuid="",this.dLineWidth=0,this.lineWidthByPixels=!0,this.dDashArray=0,this.dDashRatio=0,this.layer=""}return t.prototype.initGuid=function(t){this.sGuid.length>0?console.log("mx: init guid error"):this.sGuid=t},t.prototype.dwgInHelp=function(t,e){var i=function(t){return t instanceof Array?r(t):"object"==typeof t?function(t){return!!(t.isVector3||t.isVector2||t.isVector4)}(t)?t.clone():2==t.datatype?new THREE.Vector2(t.x,t.y):3==t.datatype?new THREE.Vector3(t.x,t.y,t.z):4==t.datatype?new THREE.Vector4(t.x,t.y,t.z,t.w):o(t,Object.create(null)):t},r=function(t){return t.map(function(t){return i(t)})},o=function(t,e){for(var r in t)t[r]&&(e[r]=i(t[r]));return e},s=this;return e.forEach(function(e){t[e]&&(s[e]=i(t[e]))}),!0},t.prototype.dwgOutHelp=function(t,e){var i=this;return e.forEach(function(e){t[e]=i[e];var r,o=(r=i[e]).isVector3?3:r.isVector2?2:r.isVector4?4:0;o&&(t[e].datatype=o)}),t},t.prototype.create=function(){return new(0,this.constructor)},t.prototype.transformBy=function(t){},t.prototype.getGeomExtents=function(){return null},t.prototype.getImp=function(){return this.MxDbEntityImp},t.prototype.setNeedUpdateDisplay=function(t){var e=this.getImp();return!!e&&(t?e.upDisplay():e.setDirtyDisplay(!0),!0)},t.prototype.getMxObject=function(){var t=this.getImp();return t?t.getMxObject():null},t.prototype.onViewChange=function(){return!1},t.prototype.objectId=function(){var t=this.getImp();return t?t.objectId():0},t.prototype.erase=function(){var t=this.getImp();return!!t&&t.erase()},t.prototype.setLayer=function(t){var e=this.getImp();e&&e.nodifySetLayer(),this.layer=t},t.prototype.getLayer=function(){return this.layer},t.prototype.setColor=function(t){this.color=t},t.prototype.getColor=function(){return this.color},t.prototype.clone=function(t){var e=this.create(),i={type:t||MxType_1.default.MxCloneType.kClone};return this.dwgOut(i),e.dwgIn(i),e.sGuid="",e},t.prototype.onDwgIn=function(t){this.color=t.color,this.renderOrder=t.renderOrder,this.opacity=t.opacity,this.visible=t.visible,t.userData?this.userData=JSON.parse(JSON.stringify(t.userData)):this.userData={},this.dLineWidth=t.lineWidth,this.lineWidthByPixels=t.lineWidthByPixels,this.dDashArray=t.dashArray,this.dDashRatio=t.dashRatio,this.layer=t.layer,t.guid&&(this.sGuid=t.guid)},t.prototype.onDwgOut=function(t){t.color=this.color,t.renderOrder=this.renderOrder,t.opacity=this.opacity,t.visible=this.visible,Object.keys(this.userData).length>0&&(t.userData=this.userData),t.lineWidth=this.dLineWidth,t.lineWidthByPixels=this.lineWidthByPixels,t.dashArray=this.dDashArray,t.dashRatio=this.dDashRatio,t.layer=this.layer,t.guid=this.sGuid},t.prototype.rxInit=function(){store_1.default.state.MxFun.initMxDbEntityType(this)},t.prototype.setRenderOrder=function(t){this.renderOrder=t},t.prototype.getRenderOrder=function(){return this.renderOrder},t.prototype.setLineWidthByPixels=function(t){this.lineWidthByPixels=t},t.prototype.getLineWidthByPixels=function(){return this.lineWidthByPixels},t.prototype.setLineWidth=function(t){this.dLineWidth=t},t.prototype.getLineWidth=function(){return this.dLineWidth},t.prototype.getGetLength=function(){return 0},t.prototype.setDashLen=function(t){var e=this.getGetLength();if(!(e<1e-6||t<1e-6)){var i=Math.floor(e/t);i<1e-6&&(this.dDashRatio=0),this.dDashArray=1/i}},t.prototype.setDashRatio=function(t){this.dDashRatio=t},t.prototype.setDashArray=function(t){this.dDashArray=t},t.prototype.setDash=function(t,e){this.dDashArray=t,this.dDashRatio=e,0==this.dLineWidth&&(this.dLineWidth=6,this.lineWidthByPixels=!0)},t.prototype.getDash=function(){return{dDashArray:this.dDashArray,dDashRatio:this.dDashRatio}},t.prototype.setDashLineDisplay=function(t){t?(this.dDashArray<1e-5&&(this.dDashArray=.03),this.dDashRatio<1e-5&&(this.dDashRatio=.1),0==this.dLineWidth&&(this.dLineWidth=6,this.lineWidthByPixels=!0)):(this.dDashArray=0,this.dDashRatio=0)},t.prototype.isDashLineDisplay=function(){return this.dDashArray>0&&this.dDashRatio>0},t.prototype.guid=function(){return this.sGuid},t}();exports.default=MxDbEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var MxCloneType,MxDefaultRenderOrder,InputToucheType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.InputToucheType=exports.MxDefaultRenderOrder=void 0,function(e){e[e.kClone=1]="kClone",e[e.kDragClone=2]="kDragClone"}(MxCloneType||(MxCloneType={})),function(e){e[e.kCADMeshRenderOrder=10]="kCADMeshRenderOrder",e[e.kCADCurveRenderOrder=20]="kCADCurveRenderOrder",e[e.kMxEntityRenderOrder=30]="kMxEntityRenderOrder",e[e.kGripRenderOrder=110]="kGripRenderOrder",e[e.kDynJigRenderOrder=120]="kDynJigRenderOrder"}(MxDefaultRenderOrder=exports.MxDefaultRenderOrder||(exports.MxDefaultRenderOrder={})),function(e){e[e.kGetBegan=1]="kGetBegan",e[e.kGetEnd=2]="kGetEnd"}(InputToucheType=exports.InputToucheType||(exports.InputToucheType={})),exports.default={MxCloneType:MxCloneType,MxDefaultRenderOrder:MxDefaultRenderOrder,InputToucheType:InputToucheType};
|
|
1
|
+
"use strict";var MxCloneType,MxDefaultRenderOrder,InputToucheType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.InputToucheType=exports.MxDefaultRenderOrder=void 0,function(e){e[e.kClone=1]="kClone",e[e.kDragClone=2]="kDragClone",e[e.kMxFileClone=3]="kMxFileClone"}(MxCloneType||(MxCloneType={})),function(e){e[e.kCADMeshRenderOrder=10]="kCADMeshRenderOrder",e[e.kCADCurveRenderOrder=20]="kCADCurveRenderOrder",e[e.kMxEntityRenderOrder=30]="kMxEntityRenderOrder",e[e.kGripRenderOrder=110]="kGripRenderOrder",e[e.kDynJigRenderOrder=120]="kDynJigRenderOrder"}(MxDefaultRenderOrder=exports.MxDefaultRenderOrder||(exports.MxDefaultRenderOrder={})),function(e){e[e.kGetBegan=1]="kGetBegan",e[e.kGetEnd=2]="kGetEnd"}(InputToucheType=exports.InputToucheType||(exports.InputToucheType={})),exports.default={MxCloneType:MxCloneType,MxDefaultRenderOrder:MxDefaultRenderOrder,InputToucheType:InputToucheType};
|