mxdraw 0.1.104 → 0.1.105
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/MxDbLeadComment/MxDbLeadComment.js +1 -1
- package/dist/lib/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.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/MxDbLeadComment/MxDbLeadComment.d.ts +3 -0
- package/dist/types/MxModule/MxDbRectBoxLeadComment/MxDbRectBoxLeadComment.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbLeadComment=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.text="",e.textHeight=20,e.textWidth=0,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbLeadComment"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){if(t.drawLine(this.point1,this.point2),this.text.length>0){var e=new THREE.Vector3,i=MxThreeJS_1.default.clacTextSpriteSize(this.text,
|
|
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"),MxDbEntity_1=require("../MxDbEntity"),MxThreeJS_1=require("../MxThreeJS"),MxDbLeadComment=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.text="",e.textHeight=20,e.textWidth=0,e.fixedSize=!1,e}return __extends(e,t),e.prototype.getTypeName=function(){return"MxDbLeadComment"},e.prototype.create=function(){return new e},e.prototype.worldDraw=function(t){if(t.drawLine(this.point1,this.point2),this.text.length>0){var e=new THREE.Vector3,i=this.textHeight,n=this.textWidth,o=t.getMxObject();this.fixedSize&&(i=o.screenCoordLong2Doc(i),n=o.screenCoordLong2Doc(n));var r=MxThreeJS_1.default.clacTextSpriteSize(this.text,i,n);e.x=this.point2.x+.5*r.textwidth,e.y=this.point2.y+.5*r.allTextHeight,t.drawText(this.text,i,0,e,n);var p=new THREE.Vector3;p.x=this.point2.x+r.textwidth,p.y=this.point2.y,t.drawLine(p,this.point2)}},e.prototype.getGripPoints=function(){var t=[];return t.push(this.point1),t.push(this.point2),t},e.prototype.moveGripPointsAt=function(t,e){return 0==t?this.point1.add(e):1==t&&this.point2.add(e),!0},e.prototype.dwgIn=function(t){return this.onDwgIn(t),this.point1.copy(t.point1),this.point2.copy(t.point2),this.text=t.text.substr(0),this.textHeight=t.textHeight,t.textWidth&&(this.textWidth=t.textWidth),this.fixedSize=t.fixedSize,!0},e.prototype.dwgOut=function(t){return this.onDwgOut(t),t.point1=this.point1,t.point2=this.point2,t.textHeight=this.textHeight,t.text=this.text,t.textWidth=this.textWidth,t.fixedSize=this.fixedSize,t},e.prototype.onViewChange=function(){return!!this.fixedSize&&(this.setNeedUpdateDisplay(!1),!0)},e}(MxDbEntity_1.default);exports.default=MxDbLeadComment;
|
|
@@ -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);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,
|
|
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.textWidth=0,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,h=i.distanceTo(this.point3);h>r.distanceTo(this.point3)&&(p=r,h=r.distanceTo(this.point3)),h>n.distanceTo(this.point3)&&(p=n,h=n.distanceTo(this.point3)),h>s.distanceTo(this.point3)&&(p=s,h=s.distanceTo(this.point3));var d=new MxDbLeadComment_1.default;d.point1=p,d.point2=this.point3,d.text=this.text,d.textHeight=this.textHeight,d.textWidth=this.textWidth,d.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,t.textWidth&&(this.textWidth=t.textWidth),!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.textWidth=this.textWidth,t},e}(MxDbEntity_1.default);exports.default=MxDbRectBoxLeadComment;
|