mxdraw 0.1.29 → 0.1.32
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/MxDbArea/MxDbArea.js +1 -1
- package/dist/lib/MxModule/MxDbCloudLine/MxDbCloudLine.js +1 -1
- package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +1 -1
- package/dist/lib/MxModule/MxDbHatch/MxDbHatch.js +1 -0
- package/dist/lib/MxModule/MxDbHatch/index.js +1 -0
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.js +1 -1
- package/dist/lib/MxModule/MxType/MxType.js +1 -1
- package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js +1 -1
- package/dist/lib/doc.js +1 -1
- package/dist/lib/mxdraw.js +1 -1
- package/dist/lib/tools/dynamicImport/index.js +1 -1
- package/dist/lib/tools/three/index.js +1 -1
- package/dist/mxdraw.es5.js +1 -1
- package/dist/mxdraw.umd.js +1 -1
- package/dist/types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts +1 -2
- package/dist/types/MxModule/McGeTool/McGeTool.d.ts +4 -2
- package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +42 -2
- package/dist/types/MxModule/Mx3PointArc/Mx3PointArc.d.ts +1 -0
- package/dist/types/MxModule/MxDb2LineAngularDimension/MxDb2LineAngularDimension.d.ts +2 -1
- package/dist/types/MxModule/MxDbAlignedDimension/MxDbAlignedDimension.d.ts +9 -1
- package/dist/types/MxModule/MxDbAnyLine/MxDbAnyLine.d.ts +4 -1
- package/dist/types/MxModule/MxDbArea/MxDbArea.d.ts +21 -0
- package/dist/types/MxModule/MxDbCloudLine/MxDbCloudLine.d.ts +22 -2
- package/dist/types/MxModule/MxDbCoord/MxDbCoord.d.ts +3 -1
- package/dist/types/MxModule/MxDbEllipse/MxDbEllipse.d.ts +3 -1
- package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +104 -103
- package/dist/types/MxModule/MxDbHatch/MxDbHatch.d.ts +16 -0
- package/dist/types/MxModule/MxDbHatch/index.d.ts +3 -0
- package/dist/types/MxModule/MxDbImage/MxDbImage.d.ts +15 -0
- package/dist/types/MxModule/MxDbLeadComment/MxDbLeadComment.d.ts +7 -0
- package/dist/types/MxModule/MxDbLine/MxDbLine.d.ts +4 -0
- package/dist/types/MxModule/MxDbPolyline/MxDbPolyline.d.ts +8 -1
- package/dist/types/MxModule/MxDbRect/MxDbRect.d.ts +6 -0
- package/dist/types/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +9 -0
- package/dist/types/MxModule/MxDbRegularPolygon/MxDbRegularPolygon.d.ts +4 -1
- package/dist/types/MxModule/MxDbSVG/MxDbSVG.d.ts +39 -3
- package/dist/types/MxModule/MxDbSVGText/MxDbSVGText.d.ts +10 -2
- package/dist/types/MxModule/MxDbText/MxDbText.d.ts +5 -1
- package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +1 -1
- package/dist/types/MxModule/MxFun/MxFun.d.ts +1 -2
- package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +7 -9
- package/dist/types/MxModule/MxType/MxType.d.ts +14 -7
- package/dist/types/doc.d.ts +36 -21
- package/dist/types/mxdraw.d.ts +5 -2
- package/dist/types/tools/three/index.d.ts +7 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,o){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(e,o)};return function(e,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function r(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(r.prototype=o.prototype,new r)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),McGeTool_1=require("../McGeTool"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxDbHatch_1=require("../MxDbHatch"),MxFun_1=require("../MxFun"),MxThreeJS_1=require("../MxThreeJS"),MxDbArea=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e.isFill=!1,e.fillColor=6697540,e.fillOpacity=.7,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbArea"},e.prototype.create=function(){return new e},e.prototype.getDimText=function(){return McGeTool_1.default.calcArea(this.points).toFixed(2)},e.prototype.worldDraw=function(t){if(this.points.length<3)2==this.points.length&&t.drawLine(this.points[0],this.points[1]);else{for(var e=this.points[0],o=e.clone(),r=e.clone(),i=this.points.length,n=1;n<i;n++){var s=this.points[n];o.x>s.x&&(o.x=s.x),o.y>s.y&&(o.y=s.y),r.x<s.x&&(r.x=s.x),r.y<s.y&&(r.y=s.y),t.drawLine(e,s),e=s}t.drawLine(e,this.points[0]);var p=new THREE.Vector3(o.x+.5*(r.x-o.x),o.y+.5*(r.y-o.y)),l=t.getColor(),u=MxFun_1.default.screenCoordLong2Doc(20),c=MxThreeJS_1.default.creatTextSprite(this.getDimText(),p,u,0,l);if(null!=c&&t.drawEntity(c),t.getType()==McGiWorldDrawType_1.default.kWorldDraw&&this.isFill){t.setColor(this.fillColor),t.setOpacity(this.fillOpacity),t.setRenderOrder(t.getRenderOrder()-1);var a=new MxDbHatch_1.default;a.points=this.points,a.worldDraw(t)}}},e.prototype.getGripPoints=function(){return this.points},e.prototype.moveGripPointsAt=function(t,e){return!(t>=this.points.length)&&(this.points[t].add(e),!0)},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var o=t.points;return this.points=[],o.forEach(function(t){e.points.push(new THREE.Vector3(t.x,t.y,t.z))}),this.dwgInHelp(t,["isFill","fillColor","fillOpacity"]),!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,this.dwgOutHelp(t,["isFill","fillColor","fillOpacity"]),t},e.prototype.addPoint=function(t){this.points.push(t.clone())},e.prototype.getPoints=function(){return this.points},e.prototype.clearPoint=function(){this.points=[]},e}(MxDbEntity_1.default);exports.default=MxDbArea;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbCloudLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e.radius=16,e.drawGeometry=null,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbCloudLine"},e.prototype.create=function(){return new e},e.prototype.setRadius=function(t){this.radius=t,this.drawGeometry=null},e.prototype.getRadius=function(){return this.radius},e.prototype.clacNewArcDiameterPoint=function(t){if(0==this.points.length)return t;var e=this.points[this.points.length-1],r=2*this.radius,n=e.distanceTo(t);if(n
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var three_1=require("three"),MxDbEntity_1=require("../MxDbEntity"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbCloudLine=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.points=[],e.radius=16,e.drawGeometry=null,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbCloudLine"},e.prototype.create=function(){return new e},e.prototype.setRadius=function(t){this.radius=t,this.drawGeometry=null},e.prototype.getRadius=function(){return this.radius},e.prototype.clacNewArcDiameterPoint=function(t){if(0==this.points.length)return t;var e=this.points[this.points.length-1],r=2*this.radius,n=e.distanceTo(t);if(n<r)return null;var o=r*(t.x-e.x)/n+e.x,i=r*(t.y-e.y)/n+e.y;return new three_1.Vector3(o,i,e.z)},e.prototype.createCloudArcCurvePoints=function(t,e,r){var n=new three_1.Vector3((t.x+e.x)/2,(t.y+e.y)/2,0);r||(r=n.distanceTo(t));var o,i,s,a,u=(o=n,i=t,s=e,a=2*Math.PI/360,{startAngle:180*Math.atan2(i.y-o.y,i.x-o.x)/Math.PI*a,endAngle:180*Math.atan2(s.y-o.y,s.x-o.x)/Math.PI*a}),h=u.startAngle,y=u.endAngle;return new three_1.ArcCurve(n.x,n.y,r,h,y,!0).getPoints(10)},e.prototype.addPoint=function(t,e){var r=this.clacNewArcDiameterPoint(t);if(r)if(this.points.push(r),e){if(this.points.length<2)return;var n=this.points[this.points.length-2],o=this.createCloudArcCurvePoints(n,r),i=this.drawGeometry;i||(i=new three_1.Geometry),o.forEach(function(t){null===i||void 0===i||i.vertices.push(new three_1.Vector3(t.x,t.y,0))}),this.drawGeometry=new three_1.Geometry,this.drawGeometry.vertices=i.vertices}else this.drawGeometry=null},e.prototype.addLine=function(t,e){this.addPoint(t);for(var r=2*this.radius,n=this.points[this.points.length-1],o=n.distanceTo(e),i=Math.round(o/r),s=0;s<i;s++){o=n.distanceTo(e);var a=r*(e.x-n.x)/o+n.x,u=r*(e.y-n.y)/o+n.y,h=new three_1.Vector3(a,u,e.z);this.addPoint(h),n=h}return this.points[this.points.length-1]},e.prototype.reCalculateDrawGeometry=function(){var t=this;if(this.drawGeometry=new three_1.Geometry,!(this.points.length<2))for(var e=this.points[0],r=this.points.length,n=1;n<r;n++){var o=this.points[n];this.createCloudArcCurvePoints(e,o).forEach(function(e){var r;null===(r=t.drawGeometry)||void 0===r||r.vertices.push(new three_1.Vector3(e.x,e.y,0))}),e=o}},e.prototype.worldDraw=function(t){var e;if(t.getType()===McGiWorldDrawType_1.default.kSelectDraw){if(!this.drawGeometry)return;this.drawGeometry.computeBoundingBox();var r=new three_1.Vector3;this.drawGeometry.boundingBox.getSize(r);var n=new three_1.Vector3;this.drawGeometry.boundingBox.getCenter(n);var o=r.x/2,i=r.y/2,s={x:n.x-o,y:n.y-i},a={x:n.x+o,y:n.y-i},u={x:n.x+o,y:n.y+i},h={x:n.x-o,y:n.y+i};t.drawLine(s.x,s.y,a.x,a.y),t.drawLine(a.x,a.y,u.x,u.y),t.drawLine(u.x,u.y,h.x,h.y),t.drawLine(h.x,h.y,s.x,s.y)}else{if(this.drawGeometry||this.reCalculateDrawGeometry(),0==(null===(e=this.drawGeometry)||void 0===e?void 0:e.vertices.length))return;var y=t.getColor(),c=new three_1.LineBasicMaterial({color:y,transparent:!0,depthTest:!1}),p=new three_1.Line(this.drawGeometry,c);t.drawEntity(p)}},e.prototype.getCenter=function(){var t=new three_1.Geometry;t.vertices=this.points;var e=new three_1.Vector3;return t.computeBoundingBox(),t.boundingBox.getCenter(e),e},e.prototype.getGripPoints=function(){return[this.getCenter()]},e.prototype.moveGripPointsAt=function(t,e){return this.points.forEach(function(t){t.add(e)}),this.drawGeometry=null,!0},e.prototype.dwgIn=function(t){var e=this;this.onDwgIn(t);var r=t.points;return this.points=[],r.forEach(function(t){e.points.push(new three_1.Vector3(t.x,t.y,t.z))}),this.drawGeometry=null,this.radius=t.radius,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t.radius=this.radius,t},e}(MxDbEntity_1.default);exports.default=MxDbCloudLine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var 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={}}return t.prototype.transformBy=function(t){},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.setColor=function(t){this.color=t},t.prototype.getColor=function(){return this.color},t.prototype.clone=function(t){var e=this.create(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var 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}return t.prototype.dwgInHelp=function(t,e){var i=function(t){return"object"==typeof t?function(t){return!!(t.isVector3||t.isVector2||t.isVector4)}(t)?t.clone():n(t,Object.create(null)):t instanceof Array?r(t):t},r=function(t){return t.map(function(t){return i(t)})},n=function(t,e){for(var r in t)t[r]&&(e[r]=i(t[r]));return e},o=this;return e.forEach(function(e){t[e]&&(o[e]=i(t[e]))}),!0},t.prototype.dwgOutHelp=function(t,e){var i=this;return e.forEach(function(e){t[e]=i[e]}),t},t.prototype.getTypeName=function(){return this.constructor.name},t.prototype.create=function(){return new(0,this.constructor)},t.prototype.transformBy=function(t){},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.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},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},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.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.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=.03,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.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}();exports.default=MxDbEntity;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])})(r,n)};return function(r,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),__spreadArray=this&&this.__spreadArray||function(t,r,n){if(n||2===arguments.length)for(var o,e=0,i=r.length;e<i;e++)!o&&e in r||(o||(o=Array.prototype.slice.call(r,0,e)),o[e]=r[e]);return t.concat(o||Array.prototype.slice.call(r))};Object.defineProperty(exports,"__esModule",{value:!0});var index_1=require("../../tools/three/index"),THREE=require("three"),McGiWorldDrawType_1=require("../McGiWorldDrawType"),MxDbEntity_1=require("../MxDbEntity"),MxDbHatch=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.points=[],r}return __extends(r,t),r.prototype.worldDraw=function(t){t.getType()===McGiWorldDrawType_1.default.kWorldDraw?t.drawSolid(this.points):t.drawLines(__spreadArray(__spreadArray([],this.points,!0),[this.points[0]],!1))},r.prototype.moveGripPointsAt=function(t,r){return 0===t?this.points.forEach(function(t){t.add(r)}):this.points[t-1]&&this.points[t-1].add(r),!0},r.prototype.setPoints=function(t){this.points=t.map(function(t){return t.clone()})},r.prototype.getGripPoints=function(){if(this.points.length>0){var t=(0,index_1.computeBounding)(this.points).centerPoint;return __spreadArray([t],this.points,!0)}return[]},r.prototype.dwgIn=function(t){this.onDwgIn(t);var r=t.points;return this.points=r.map(function(t){var r=t.x,n=t.y,o=t.z;return new THREE.Vector3(r,n,o)}),!0},r.prototype.dwgOut=function(t){return this.onDwgOut(t),t.points=this.points,t},r}(MxDbEntity_1.default);exports.default=MxDbHatch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxDbHatch_1=require("./MxDbHatch");exports.default=MxDbHatch_1.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbLeadComment_1=require("../MxDbLeadComment"),MxDbCloudLine_1=require("../MxDbCloudLine"),MxDbEntity_1=require("../MxDbEntity"),MxDbRectBoxLeadComment=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e.point3=new THREE.Vector3,e.text="",e.textHeight=20,e.radius=16,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbRectBoxLeadComment"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){var e=new MxDbCloudLine_1.default;e.setRadius(this.radius);var i=this.point1.clone(),n=this.point2.clone();if(i.x>n.x){var o=i.x;i.x=n.x,n.x=o}if(i.y>n.y){o=i.y;i.y=n.y,n.y=o}var r=new THREE.Vector3(i.x,n.y,i.z),
|
|
1
|
+
"use strict";var __extends=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var THREE=require("three"),MxDbLeadComment_1=require("../MxDbLeadComment"),MxDbCloudLine_1=require("../MxDbCloudLine"),MxDbEntity_1=require("../MxDbEntity"),MxDbRectBoxLeadComment=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.point1=new THREE.Vector3,e.point2=new THREE.Vector3,e.point3=new THREE.Vector3,e.text="",e.textHeight=20,e.radius=16,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbRectBoxLeadComment"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){var e=new MxDbCloudLine_1.default;e.setRadius(this.radius);var i=this.point1.clone(),n=this.point2.clone();if(i.x>n.x){var o=i.x;i.x=n.x,n.x=o}if(i.y>n.y){o=i.y;i.y=n.y,n.y=o}var r=new THREE.Vector3(i.x,n.y,i.z);r=e.addLine(i,r),n=new THREE.Vector3(n.x,r.y,n.z),n=e.addLine(r,n);var s=new THREE.Vector3(n.x,i.y,i.z);if(s=e.addLine(n,s),i=e.addLine(s,i),e.worldDraw(t),this.text.length>0){var p=i,u=i.distanceTo(this.point3);u>r.distanceTo(this.point3)&&(p=r,u=r.distanceTo(this.point3)),u>n.distanceTo(this.point3)&&(p=n,u=n.distanceTo(this.point3)),u>s.distanceTo(this.point3)&&(p=s,u=s.distanceTo(this.point3));var a=new MxDbLeadComment_1.default;a.point1=p,a.point2=this.point3,a.text=this.text,a.textHeight=this.textHeight,a.worldDraw(t)}},e.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t.push(this.point3),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.point1.add(e):1==t?this.point2.add(e):2==t&&this.point3.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.point3.copy(t.point3),this.text=t.text.substr(0),this.textHeight=t.textHeight,this.radius=t.radius,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.point3=this.point3,t.textHeight=this.textHeight,t.text=this.text,t.radius=this.radius,t},e}(MxDbEntity_1.default);exports.default=MxDbRectBoxLeadComment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var MxCloneType,
|
|
1
|
+
"use strict";var MxCloneType,MxDefaultRenderOrder;Object.defineProperty(exports,"__esModule",{value:!0}),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={})),exports.default={MxCloneType:MxCloneType,MxDefaultRenderOrder:MxDefaultRenderOrder};
|