mxdraw 0.1.53 → 0.1.56

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxCADObject=function(){function e(e){this._mxCAD=e}return e.prototype.newFile=function(){this._mxCAD.newFile()},e.prototype.openFile=function(e,t){this._mxCAD.openFile(e,t)},e.prototype.saveFile=function(e,t){this._mxCAD.saveFile(e,t)},e.prototype.getDisplayFromServer=function(){this._mxCAD.getDisplayFromServer()},e}();exports.default=MxCADObject;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var MxCADObject_1=require("./MxCADObject");exports.default=MxCADObject_1.default;
@@ -1 +1 @@
1
- "use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function a(t){try{d(o.next(t))}catch(t){i(t)}}function u(t){try{d(o.throw(t))}catch(t){i(t)}}function d(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(a,u)}d((o=o.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var MxDbDatabase_1=require("../MxDbDatabase"),MxThreeJS_1=require("../MxThreeJS"),MxDrawObject=function(){function t(t){this._mxdrawObj=t}return t.prototype.getScene=function(){return this._mxdrawObj.getScene()},t.prototype.getCamera=function(){return this._mxdrawObj.getCamera()},t.prototype.getRenderer=function(){return this._mxdrawObj.renderer},t.prototype.setMouseRightRotate=function(t){return void 0===t&&(t=!0),this._mxdrawObj.setMouseRightRotate(t)},t.prototype.getFullDisplayRange=function(){return this._mxdrawObj.getFullDisplayRange()},t.prototype.getCanvas=function(){return this._mxdrawObj.getCanvas()},t.prototype.updateDisplay=function(){return this._mxdrawObj.updateDisplay()},t.prototype.createCanvasImageData=function(t,e){return this._mxdrawObj.createCanvasImageData(t,e)},t.prototype.setViewColor=function(t){return this._mxdrawObj.setViewColor(t)},t.prototype.setSize=function(t,e){return this._mxdrawObj.setSize(t,e)},t.prototype.getIntersectObjects=function(t){return this._mxdrawObj.getIntersectObjects(t)},t.prototype.addObject=function(t,e){return void 0===e&&(e=!0),this._mxdrawObj.addObject(t,e)},t.prototype.addViewObject=function(t){return this._mxdrawObj.addViewObject(t)},t.prototype.getViewWidth=function(){return this._mxdrawObj.getViewWidth()},t.prototype.getViewHeight=function(){return this._mxdrawObj.getViewHeight()},t.prototype.removeObject=function(t,e){return void 0===e&&(e=!0),this._mxdrawObj.removeObject(t,e)},t.prototype.zoomInitialStates=function(){return this._mxdrawObj.zoomInitialStates()},t.prototype.zoomScale=function(t){return this._mxdrawObj.zoomScale(t)},t.prototype.zoomW=function(t,e,r){return this._mxdrawObj.zoomW(t,e,r)},t.prototype.zoomCenter=function(t,e){return this._mxdrawObj.zoomCenter(t,e)},t.prototype.initZoomW=function(t,e){return this._mxdrawObj.initZoomW(t,e)},t.prototype.addEvent=function(t,e){return this._mxdrawObj.addEvent(t,e)},t.prototype.on=function(t,e){return this._mxdrawObj.addEvent(t,e)},t.prototype.setIniset=function(t){return this._mxdrawObj.setIniset(t)},t.prototype.screenCoord2World=function(t,e,r){return this._mxdrawObj.screenCoord2World(t,e,r)},t.prototype.worldCoord2Screen=function(t,e,r){return this._mxdrawObj.worldCoord2Screen(t,e,r)},t.prototype.screenCoord2Doc=function(t,e){return this._mxdrawObj.screenCoord2Doc(t,e,0)},t.prototype.worldCoordLong2Doc=function(t){return this._mxdrawObj.worldCoordLong2Doc(t)},t.prototype.docCoordLong2World=function(t){return this._mxdrawObj.docCoordLong2World(t)},t.prototype.docCoord2World=function(t,e,r){return this._mxdrawObj.docCoord2World(t,e,r)},t.prototype.docCoord2World2=function(t){return this._mxdrawObj.docCoord2World(t.x,t.y,t.z)},t.prototype.worldCoord2Doc=function(t,e,r){return this._mxdrawObj.worldCoord2Doc(t,e,r)},t.prototype.worldCoord2Doc2=function(t){return this._mxdrawObj.worldCoord2Doc(t.x,t.y,t.z)},t.prototype.docCoord2Screen=function(t,e){return this._mxdrawObj.docCoord2Screen(t,e,0)},t.prototype.screenCoordLong2Doc=function(t){return this._mxdrawObj.screenCoordLong2Doc(t)},t.prototype.docCoordLong2Screen=function(t){return this._mxdrawObj.docCoordLong2Screen(t)},t.prototype.screenCoordLong2World=function(t){return this._mxdrawObj.screenCoordLong2World(t)},t.prototype.worldCoordLong2Screen=function(t){return this._mxdrawObj.worldCoordLong2Screen(t)},t.prototype.initRendererParam=function(t){return this._mxdrawObj.initRendererParam(t)},t.prototype.addMxEntity=function(t){return this._mxdrawObj.addMxEntity(t)},t.prototype.getMxCurrentSelect=function(){return this._mxdrawObj.getMxAllSelect()},t.prototype.addMxCurrentSelect=function(t){return this._mxdrawObj.addMxCurrentSelect(t)},t.prototype.clearMxCurrentSelect=function(){return this._mxdrawObj.clearMxCurrentSelect()},t.prototype.getMxEntity=function(t){return this._mxdrawObj.getMxEntityUserObject(t)},t.prototype.findMxEntityAtPoint=function(t){return this._mxdrawObj.findMxEntityAtPoint(t)},t.prototype.getAllMxEntity=function(){return this._mxdrawObj.getAllMxEntity()},t.prototype.setMouseMiddlePan=function(t){return this._mxdrawObj.setMouseMiddlePan(t)},t.prototype.resetThreeJSControls=function(){return this._mxdrawObj.resetThreeJSControls()},t.prototype.enableZoom=function(t){return this._mxdrawObj.enableZoom(t)},t.prototype.enablePan=function(t){return this._mxdrawObj.enablePan(t)},t.prototype.eraseMxEntity=function(t){return this._mxdrawObj.eraseMxEntity(t)},t.prototype.removeViewObject=function(t){this._mxdrawObj.removeViewObject(t)},t.prototype.saveMxEntityToJson=function(){return this._mxdrawObj.saveMxEntityToJson()},t.prototype.loadMxEntityFromJson=function(t,e){return void 0===e&&(e=null),__awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(n){switch(n.label){case 0:if(!e)return[3,4];r=e.length,o=0,n.label=1;case 1:return o<r?[4,MxThreeJS_1.default.loadSVG(e[o])]:[3,4];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2,this._mxdrawObj.loadMxEntityFromJson(t)]}})})},t.prototype.eraseAllMxEntity=function(){return this._mxdrawObj.eraseAllMxEntity()},t.prototype.makeCurrent=function(){this._mxdrawObj.makeCurrent()},t.prototype.getViewCenterDocCoord=function(){return this._mxdrawObj.getViewCenterDocCoord()},t.prototype.updateCanvasSize=function(){this._mxdrawObj.updateCanvasSize()},t.prototype.newFile=function(t,e,r,o){return this._mxdrawObj.newFile(t,e,r,o)},t.prototype.stopAllLoading=function(){return this._mxdrawObj.stopAllLoading()},t.prototype.getOrbitControls=function(){return this._mxdrawObj.getOrbitControls()},t.prototype.getMxDatabase=function(){return new MxDbDatabase_1.default(this._mxdrawObj.getMxDatabase())},t}();exports.default=MxDrawObject;
1
+ "use strict";var __awaiter=this&&this.__awaiter||function(t,e,r,o){return new(r||(r=Promise))(function(n,i){function a(t){try{d(o.next(t))}catch(t){i(t)}}function u(t){try{d(o.throw(t))}catch(t){i(t)}}function d(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r(function(t){t(e)})).then(a,u)}d((o=o.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(n=(n=a.trys).length>0&&n[n.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}};Object.defineProperty(exports,"__esModule",{value:!0});var MxCADObject_1=require("../MxCADObject"),MxDbDatabase_1=require("../MxDbDatabase"),MxThreeJS_1=require("../MxThreeJS"),MxDrawObject=function(){function t(t){this._mxdrawObj=t}return t.prototype.getScene=function(){return this._mxdrawObj.getScene()},t.prototype.getCamera=function(){return this._mxdrawObj.getCamera()},t.prototype.getRenderer=function(){return this._mxdrawObj.renderer},t.prototype.setMouseRightRotate=function(t){return void 0===t&&(t=!0),this._mxdrawObj.setMouseRightRotate(t)},t.prototype.getFullDisplayRange=function(){return this._mxdrawObj.getFullDisplayRange()},t.prototype.getCanvas=function(){return this._mxdrawObj.getCanvas()},t.prototype.updateDisplay=function(){return this._mxdrawObj.updateDisplay()},t.prototype.createCanvasImageData=function(t,e){return this._mxdrawObj.createCanvasImageData(t,e)},t.prototype.setViewColor=function(t){return this._mxdrawObj.setViewColor(t)},t.prototype.setSize=function(t,e){return this._mxdrawObj.setSize(t,e)},t.prototype.getIntersectObjects=function(t){return this._mxdrawObj.getIntersectObjects(t)},t.prototype.addObject=function(t,e){return void 0===e&&(e=!0),this._mxdrawObj.addObject(t,e)},t.prototype.addViewObject=function(t){return this._mxdrawObj.addViewObject(t)},t.prototype.getViewWidth=function(){return this._mxdrawObj.getViewWidth()},t.prototype.getViewHeight=function(){return this._mxdrawObj.getViewHeight()},t.prototype.removeObject=function(t,e){return void 0===e&&(e=!0),this._mxdrawObj.removeObject(t,e)},t.prototype.zoomInitialStates=function(){return this._mxdrawObj.zoomInitialStates()},t.prototype.zoomScale=function(t){return this._mxdrawObj.zoomScale(t)},t.prototype.zoomW=function(t,e,r){return this._mxdrawObj.zoomW(t,e,r)},t.prototype.zoomCenter=function(t,e){return this._mxdrawObj.zoomCenter(t,e)},t.prototype.initZoomW=function(t,e){return this._mxdrawObj.initZoomW(t,e)},t.prototype.addEvent=function(t,e){return this._mxdrawObj.addEvent(t,e)},t.prototype.on=function(t,e){return this._mxdrawObj.addEvent(t,e)},t.prototype.setIniset=function(t){return this._mxdrawObj.setIniset(t)},t.prototype.screenCoord2World=function(t,e,r){return this._mxdrawObj.screenCoord2World(t,e,r)},t.prototype.worldCoord2Screen=function(t,e,r){return this._mxdrawObj.worldCoord2Screen(t,e,r)},t.prototype.screenCoord2Doc=function(t,e){return this._mxdrawObj.screenCoord2Doc(t,e,0)},t.prototype.worldCoordLong2Doc=function(t){return this._mxdrawObj.worldCoordLong2Doc(t)},t.prototype.docCoordLong2World=function(t){return this._mxdrawObj.docCoordLong2World(t)},t.prototype.docCoord2World=function(t,e,r){return this._mxdrawObj.docCoord2World(t,e,r)},t.prototype.docCoord2World2=function(t){return this._mxdrawObj.docCoord2World(t.x,t.y,t.z)},t.prototype.worldCoord2Doc=function(t,e,r){return this._mxdrawObj.worldCoord2Doc(t,e,r)},t.prototype.worldCoord2Doc2=function(t){return this._mxdrawObj.worldCoord2Doc(t.x,t.y,t.z)},t.prototype.docCoord2Screen=function(t,e){return this._mxdrawObj.docCoord2Screen(t,e,0)},t.prototype.screenCoordLong2Doc=function(t){return this._mxdrawObj.screenCoordLong2Doc(t)},t.prototype.docCoordLong2Screen=function(t){return this._mxdrawObj.docCoordLong2Screen(t)},t.prototype.screenCoordLong2World=function(t){return this._mxdrawObj.screenCoordLong2World(t)},t.prototype.worldCoordLong2Screen=function(t){return this._mxdrawObj.worldCoordLong2Screen(t)},t.prototype.initRendererParam=function(t){return this._mxdrawObj.initRendererParam(t)},t.prototype.addMxEntity=function(t){return this._mxdrawObj.addMxEntity(t)},t.prototype.getMxCurrentSelect=function(){return this._mxdrawObj.getMxAllSelect()},t.prototype.addMxCurrentSelect=function(t){return this._mxdrawObj.addMxCurrentSelect(t)},t.prototype.clearMxCurrentSelect=function(){return this._mxdrawObj.clearMxCurrentSelect()},t.prototype.getMxEntity=function(t){return this._mxdrawObj.getMxEntityUserObject(t)},t.prototype.findMxEntityAtPoint=function(t){return this._mxdrawObj.findMxEntityAtPoint(t)},t.prototype.getAllMxEntity=function(){return this._mxdrawObj.getAllMxEntity()},t.prototype.setMouseMiddlePan=function(t){return this._mxdrawObj.setMouseMiddlePan(t)},t.prototype.resetThreeJSControls=function(){return this._mxdrawObj.resetThreeJSControls()},t.prototype.enableZoom=function(t){return this._mxdrawObj.enableZoom(t)},t.prototype.enablePan=function(t){return this._mxdrawObj.enablePan(t)},t.prototype.eraseMxEntity=function(t){return this._mxdrawObj.eraseMxEntity(t)},t.prototype.removeViewObject=function(t){this._mxdrawObj.removeViewObject(t)},t.prototype.saveMxEntityToJson=function(){return this._mxdrawObj.saveMxEntityToJson()},t.prototype.loadMxEntityFromJson=function(t,e){return void 0===e&&(e=null),__awaiter(this,void 0,void 0,function(){var r,o;return __generator(this,function(n){switch(n.label){case 0:if(!e)return[3,4];r=e.length,o=0,n.label=1;case 1:return o<r?[4,MxThreeJS_1.default.loadSVG(e[o])]:[3,4];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2,this._mxdrawObj.loadMxEntityFromJson(t)]}})})},t.prototype.eraseAllMxEntity=function(){return this._mxdrawObj.eraseAllMxEntity()},t.prototype.makeCurrent=function(){this._mxdrawObj.makeCurrent()},t.prototype.getViewCenterDocCoord=function(){return this._mxdrawObj.getViewCenterDocCoord()},t.prototype.updateCanvasSize=function(){this._mxdrawObj.updateCanvasSize()},t.prototype.newFile=function(t,e,r,o){return this._mxdrawObj.newFile(t,e,r,o)},t.prototype.stopAllLoading=function(){return this._mxdrawObj.stopAllLoading()},t.prototype.getOrbitControls=function(){return this._mxdrawObj.getOrbitControls()},t.prototype.getMxDatabase=function(){return new MxDbDatabase_1.default(this._mxdrawObj.getMxDatabase())},t.prototype.setZoomSpeed=function(t){return this._mxdrawObj.setZoomSpeed(t)},t.prototype.getMxCAD=function(){var t=this._mxdrawObj.getMxCAD();return new MxCADObject_1.default(t)},t}();exports.default=MxDrawObject;
@@ -1 +1 @@
1
- "use strict";var __spreadArray=this&&this.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var r,n=0,a=e.length;n<a;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(exports,"__esModule",{value:!0});var random_1=require("../../tools/algorithm/random"),create_1=require("../../tools/dom/create"),MxDrawObject_1=require("../MxDrawObject"),store_1=require("../store"),useCanvasResizeListener_1=require("../useCanvasResizeListener"),MrxDbgUiPrPoint_1=require("../MrxDbgUiPrPoint"),mxUiData_1=require("../loadCoreCode/mxUiData"),MxDbDatabase_1=require("../MxDbDatabase"),MxFun=function(){function t(){}return t.prototype.createMxObject=function(t){var e=t.canvasId,o=void 0===e?(0,random_1.createReandomId)():e,r=t.cadFile,n=void 0===r?"":r,a=t.callback,u=t.isNewFile,s=void 0!==u&&u,i=t.useWebsocket,d=void 0!==i&&i,c=t.isAutoResize,l=void 0===c||c,p=t.mapBox;if(this.initUiDataObject(mxUiData_1.default),!d&&s&&(s=!1),p){var f=p.canvas;store_1.default.state.MxFun.createMxObject(f,n,function(t){var e=new MxDrawObject_1.default(t);t.setIniset({EnableOsnapFunction:!0}),a&&a(e,{canvas:f,canvasParent:void 0})},void 0,s,d,p)}else{var x=(0,create_1.createCanvas)(o),M=(0,create_1.createCanvasParent)(x);M.parentNode&&11!=M.parentNode.nodeType||document.body.appendChild(M),store_1.default.state.MxFun.createMxObject(o,n,function(t){var e=new MxDrawObject_1.default(t);t.setMouseRightRotate(!1),t.setIniset({EnableOsnapFunction:!0}),t.addEvent("onResize",function(){return M.tabindex=3,{width:M.clientWidth,height:M.clientHeight}}),l&&(0,useCanvasResizeListener_1.default)(e,x),a&&a(e,{canvas:x,canvasParent:M})},void 0,s,d,void 0)}},t.prototype.setMxServer=function(t){void 0===t&&(t="ws://localhost:5090"),store_1.default.state.MxFun.setMxServer(t)},t.prototype.enablStaticLoad=function(t){store_1.default.state.MxFun.enablStaticLoad(t)},t.prototype.setStaticServer=function(t){store_1.default.state.MxFun.setStaticServer(t)},t.prototype.addCommand=function(t,e){store_1.default.state.MxFun.addCommand(t,e)},t.prototype.sendStringToExecute=function(t){for(var e,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return(e=store_1.default.state.MxFun).sendStringToExecute.apply(e,__spreadArray([t],o,!1))},t.prototype.call=function(t,e,o){return store_1.default.state.MxFun.call(t,e,o)},t.prototype.getCurrentDraw=function(){return new MxDrawObject_1.default(store_1.default.state.MxFun.getCurrentDraw())},t.prototype.getCurrentDatabase=function(){var t=store_1.default.state.MxFun.getCurrentDraw();return new MxDbDatabase_1.default(t.getMxDatabase())},t.prototype.screenCoordLong2World=function(t){return store_1.default.state.MxFun.screenCoordLong2World(t)},t.prototype.screenCoordLong2Doc=function(t){return store_1.default.state.MxFun.screenCoordLong2Doc(t)},t.prototype.docCoordLong2Screen=function(t){return store_1.default.state.MxFun.docCoordLong2Screen(t)},t.prototype.worldCoordLong2Doc=function(t){return store_1.default.state.MxFun.worldCoordLong2Doc(t)},t.prototype.docCoordLong2World=function(t){return store_1.default.state.MxFun.docCoordLong2World(t)},t.prototype.screenCoord2World=function(t,e,o){return store_1.default.state.MxFun.screenCoord2World(t,e,o)},t.prototype.worldCoord2Screen=function(t,e,o){return store_1.default.state.MxFun.worldCoord2Screen(t,e,o)},t.prototype.docCoord2World=function(t,e,o){return store_1.default.state.MxFun.docCoord2World(t,e,o)},t.prototype.worldCoord2Doc=function(t,e,o){return store_1.default.state.MxFun.worldCoord2Doc(t,e,o)},t.prototype.screenCoord2Doc=function(t,e){return store_1.default.state.MxFun.screenCoord2Doc(t,e,0)},t.prototype.docCoord2Screen=function(t,e){return store_1.default.state.MxFun.docCoord2Screen(t,e,0)},t.prototype.updateDisplay=function(){return store_1.default.state.MxFun.updateDisplay()},t.prototype.addWindowsEvent=function(t){return store_1.default.state.MxFun.addWindowsEvent(t)},t.prototype.isRunningCommand=function(){return store_1.default.state.MxFun.isRunningCommand()},t.prototype.zoomW=function(t,e,o,r,n){return store_1.default.state.MxFun.zoomW(t,e,o,r,n)},t.prototype.showLayer=function(t,e,o){return store_1.default.state.MxFun.showLayer(t,e,o)},t.prototype.getCurrentMxCAD=function(){return store_1.default.state.MxFun.getCurrentMxCAD()},t.prototype.getQueryString=function(t){return store_1.default.state.MxFun.getQueryString(t)},t.prototype.setIniset=function(t){return store_1.default.state.MxFun.setIniset(t)},t.prototype.upDisplayForLayerData=function(t){return store_1.default.state.MxFun.upDisplayForLayerData(t)},t.prototype.initUiDataObject=function(t){return store_1.default.state.MxFun.initUiDataObject(t)},t.prototype.testMX=function(t){return 11},t.prototype.loadImageMaterial=function(t,e){return e?(store_1.default.state.MxFun.loadImageMaterial(t,e),new Promise(function(t,e){t(null)})):new Promise(function(e,o){store_1.default.state.MxFun.loadImageMaterial(t,function(t){e(t||null)})})},t.prototype.openFile=function(t,e){return void 0===e&&(e=!1),store_1.default.state.MxFun.openFile(t,e)},t.prototype.addToCurrentSpace=function(t){return this.getCurrentDraw().addMxEntity(t)},t.prototype.selectEnt=function(t,e){var o=this;return void 0===e&&(e=null),new Promise(function(r,n){var a=new MrxDbgUiPrPoint_1.default;a.setMessage(t),a.go(function(t){if(0==t){for(var n=a.value(),u=o.getCurrentDraw().findMxEntityAtPoint(n),s=0;0!=u.length;){for(var i=u.length,d=0;d<i;d++){var c=u[d];if(!e||!e.type||e.type==c.getTypeName()){s=c.objectId();break}}break}r(s)}else r(0)})})},t.prototype.listenForCommandLineInput=function(t){mxUiData_1.default.getCmdLine().mountUpDisplayFun(t)},t.prototype.setCommandLineInputData=function(t,e){mxUiData_1.default.getCmdLine().setCmdText(t),mxUiData_1.default.onKeydown(e)},t.prototype.listenForCoordTip=function(t){mxUiData_1.default.mountSetCoordFun(t)},t.prototype.getMxFunTHREE=function(){return store_1.default.state.MxFun.getTHREE()},t.prototype.getMxFunThreeTool=function(){return store_1.default.state.MxFun.getMxThreeJS()},t}();exports.default=MxFun;
1
+ "use strict";var __spreadArray=this&&this.__spreadArray||function(t,e,o){if(o||2===arguments.length)for(var r,n=0,a=e.length;n<a;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(exports,"__esModule",{value:!0});var random_1=require("../../tools/algorithm/random"),create_1=require("../../tools/dom/create"),MxDrawObject_1=require("../MxDrawObject"),store_1=require("../store"),useCanvasResizeListener_1=require("../useCanvasResizeListener"),MrxDbgUiPrPoint_1=require("../MrxDbgUiPrPoint"),mxUiData_1=require("../loadCoreCode/mxUiData"),MxDbDatabase_1=require("../MxDbDatabase"),MxFun=function(){function t(){this.listenForUpdateCursor=function(t){mxUiData_1.default.mountUpdateCursorFun(t)}}return t.prototype.createMxObject=function(t){var e=t.canvasId,o=void 0===e?(0,random_1.createReandomId)():e,r=t.cadFile,n=void 0===r?"":r,a=t.callback,u=t.isNewFile,i=void 0!==u&&u,s=t.useWebsocket,d=void 0!==s&&s,c=t.isAutoResize,l=void 0===c||c,p=t.mapBox,f=t.isMxCAD,x=void 0!==f&&f;if(this.initUiDataObject(mxUiData_1.default),!d&&i&&(i=!1),p){var M=p.canvas;store_1.default.state.MxFun.createMxObject(M,n,function(t){var e=new MxDrawObject_1.default(t);t.setIniset({EnableOsnapFunction:!0}),a&&a(e,{canvas:M,canvasParent:void 0})},void 0,i,d,p)}else{var y=(0,create_1.createCanvas)(o),_=(0,create_1.createCanvasParent)(y);_.parentNode&&11!=_.parentNode.nodeType||document.body.appendChild(_);var C=void 0;x&&(C=!0,d=!0),store_1.default.state.MxFun.createMxObject(o,n,function(t){var e=new MxDrawObject_1.default(t);if(x){t.initRunMode(2)}t.setMouseRightRotate(!1),t.setIniset({EnableOsnapFunction:!0}),t.addEvent("onResize",function(){return _.tabindex=3,{width:_.clientWidth,height:_.clientHeight}}),l&&(0,useCanvasResizeListener_1.default)(e,y),a&&a(e,{canvas:y,canvasParent:_})},C,i,d,void 0)}},t.prototype.setMxServer=function(t){void 0===t&&(t="ws://localhost:5090"),store_1.default.state.MxFun.setMxServer(t)},t.prototype.enablStaticLoad=function(t){store_1.default.state.MxFun.enablStaticLoad(t)},t.prototype.setStaticServer=function(t){store_1.default.state.MxFun.setStaticServer(t)},t.prototype.addCommand=function(t,e){store_1.default.state.MxFun.addCommand(t,e)},t.prototype.sendStringToExecute=function(t){for(var e,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];return(e=store_1.default.state.MxFun).sendStringToExecute.apply(e,__spreadArray([t],o,!1))},t.prototype.call=function(t,e,o){return store_1.default.state.MxFun.call(t,e,o)},t.prototype.getCurrentDraw=function(){return new MxDrawObject_1.default(store_1.default.state.MxFun.getCurrentDraw())},t.prototype.getCurrentDatabase=function(){var t=store_1.default.state.MxFun.getCurrentDraw();return new MxDbDatabase_1.default(t.getMxDatabase())},t.prototype.screenCoordLong2World=function(t){return store_1.default.state.MxFun.screenCoordLong2World(t)},t.prototype.screenCoordLong2Doc=function(t){return store_1.default.state.MxFun.screenCoordLong2Doc(t)},t.prototype.docCoordLong2Screen=function(t){return store_1.default.state.MxFun.docCoordLong2Screen(t)},t.prototype.worldCoordLong2Doc=function(t){return store_1.default.state.MxFun.worldCoordLong2Doc(t)},t.prototype.docCoordLong2World=function(t){return store_1.default.state.MxFun.docCoordLong2World(t)},t.prototype.screenCoord2World=function(t,e,o){return store_1.default.state.MxFun.screenCoord2World(t,e,o)},t.prototype.worldCoord2Screen=function(t,e,o){return store_1.default.state.MxFun.worldCoord2Screen(t,e,o)},t.prototype.docCoord2World=function(t,e,o){return store_1.default.state.MxFun.docCoord2World(t,e,o)},t.prototype.worldCoord2Doc=function(t,e,o){return store_1.default.state.MxFun.worldCoord2Doc(t,e,o)},t.prototype.screenCoord2Doc=function(t,e){return store_1.default.state.MxFun.screenCoord2Doc(t,e,0)},t.prototype.docCoord2Screen=function(t,e){return store_1.default.state.MxFun.docCoord2Screen(t,e,0)},t.prototype.updateDisplay=function(){return store_1.default.state.MxFun.updateDisplay()},t.prototype.addWindowsEvent=function(t){return store_1.default.state.MxFun.addWindowsEvent(t)},t.prototype.isRunningCommand=function(){return store_1.default.state.MxFun.isRunningCommand()},t.prototype.zoomW=function(t,e,o,r,n){return store_1.default.state.MxFun.zoomW(t,e,o,r,n)},t.prototype.showLayer=function(t,e,o){return store_1.default.state.MxFun.showLayer(t,e,o)},t.prototype.getCurrentMxCAD=function(){return store_1.default.state.MxFun.getCurrentMxCAD()},t.prototype.getQueryString=function(t){return store_1.default.state.MxFun.getQueryString(t)},t.prototype.setIniset=function(t){return store_1.default.state.MxFun.setIniset(t)},t.prototype.upDisplayForLayerData=function(t){return store_1.default.state.MxFun.upDisplayForLayerData(t)},t.prototype.initUiDataObject=function(t){return store_1.default.state.MxFun.initUiDataObject(t)},t.prototype.testMX=function(t){return 11},t.prototype.loadImageMaterial=function(t,e){return e?(store_1.default.state.MxFun.loadImageMaterial(t,e),new Promise(function(t,e){t(null)})):new Promise(function(e,o){store_1.default.state.MxFun.loadImageMaterial(t,function(t){e(t||null)})})},t.prototype.openFile=function(t,e){return void 0===e&&(e=!1),store_1.default.state.MxFun.openFile(t,e)},t.prototype.addToCurrentSpace=function(t){return this.getCurrentDraw().addMxEntity(t)},t.prototype.selectEnt=function(t,e){var o=this;return void 0===e&&(e=null),new Promise(function(r,n){var a=new MrxDbgUiPrPoint_1.default;a.setMessage(t),a.go(function(t){if(0==t){for(var n=a.value(),u=o.getCurrentDraw().findMxEntityAtPoint(n),i=0;0!=u.length;){for(var s=u.length,d=0;d<s;d++){var c=u[d];if(!e||!e.type||e.type==c.getTypeName()){i=c.objectId();break}}break}r(i)}else r(0)})})},t.prototype.listenForCommandLineInput=function(t){mxUiData_1.default.getCmdLine().mountUpDisplayFun(t)},t.prototype.setCommandLineInputData=function(t,e){mxUiData_1.default.getCmdLine().setCmdText(t),mxUiData_1.default.onKeydown(e)},t.prototype.listenForCoordTip=function(t){mxUiData_1.default.mountSetCoordFun(t)},t.prototype.getMxFunTHREE=function(){return store_1.default.state.MxFun.getTHREE()},t.prototype.getMxFunThreeTool=function(){return store_1.default.state.MxFun.getMxThreeJS()},t.prototype.ceneratecursor=function(t,e,o){return void 0===t&&(t=128),void 0===e&&(e=10),void 0===o&&(o=!0),store_1.default.state.MxFun.ceneratecursor(t,e,o)},t}();exports.default=MxFun;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MxVueInterface=void 0;var MxVueComandLine=function(){function t(){var t=this;this.msCmdText="",this.msCmdDisplay="",this.msCmdTip="",this.mUpDisplayFun=void 0,this.mxFunObject=void 0,this.mountUpDisplayFun=function(n){t.mUpDisplayFun=n},this.setCmdText=function(n){t.msCmdText=n},this.getCmdText=function(){return t.msCmdText},this.getCmdDisplay=function(){return t.msCmdDisplay},this.setCmdDisplay=function(n){t.msCmdDisplay=n},this.addCmdDisplay=function(n){t.msCmdDisplay.length>1024?(t.msCmdDisplay=t.msCmdDisplay.substring(t.msCmdDisplay.length-1024,t.msCmdDisplay.length),t.msCmdDisplay=t.msCmdDisplay+n):t.msCmdDisplay=t.msCmdDisplay+n},this.setCmdTip=function(n){t.msCmdTip=n},this.getCmdTip=function(){return t.msCmdTip}}return t.prototype.upDisplay=function(){var t=this.msCmdTip,n=this.msCmdDisplay,e=this.msCmdText;void 0!=this.mUpDisplayFun&&this.mUpDisplayFun({msCmdTip:t,msCmdDisplay:n,msCmdText:e})},t}(),MxInputType={kNoInput:0,kXYCoordInput:1,kDistanceInput:2,kDynTip:3},MxInputPostionType={kRelative:0,kAbsolutely:1},MxDynamicInput=function(){return function(){var t=this;this.mType=MxInputType.kNoInput,this.mPos=[0,0],this.mTip="",this.mValue1="",this.mValue1Pos=[0,0],this.mValue2="",this.mValue2Pos=[0,0],this.misShow=!1,this.mOnKeydownEvent=void 0,this.mFocusValue="",this.setFocusValue=function(n){t.mFocusValue=n},this.getFocusValue=function(){return t.mFocusValue},this.mountKeydownEvent=function(n){t.mOnKeydownEvent=n},this.onKeydown=function(n){void 0!=t.mOnKeydownEvent&&t.mOnKeydownEvent(n)},this.setType=function(n){t.mType=n},this.getType=function(){return t.mType},this.isShow=function(){return t.misShow},this.setPos=function(n){t.mPos=n},this.setTip=function(n){t.mTip=n},this.setValue1=function(n){t.mValue1=n},this.getValue1=function(){return t.mValue1},this.setValue1Pos=function(n){t.mValue1Pos=n},this.setValue2=function(n){t.mValue2=n},this.getValue2=function(){return t.mValue2},this.setValue2Pos=function(n){t.mValue2Pos=n},this.setShow=function(n){t.misShow=n},this.getData=function(){if(t.misShow){var n={list:[{value:"",readonly:!0},{value:"",readonly:!1},{value:"",readonly:!1}],pos:t.mPos,postype:MxInputPostionType.kRelative};if(t.mType!=MxInputType.kNoInput)return t.mType==MxInputType.kXYCoordInput?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!0,n.list[1].value=t.mValue1,n.list[1].readonly=!1,n.list[2].show=!0,n.list[2].value=t.mValue2,n.list[2].readonly=!1):t.mType==MxInputType.kDistanceInput?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!0,n.list[1].value=t.mValue1,n.list[1].readonly=!1,n.list[1].pos=t.mValue1Pos,n.list[2].show=!0,n.list[2].value=t.mValue2,n.list[2].readonly=!0,n.list[2].pos=t.mValue2Pos,n.postype=MxInputPostionType.kAbsolutely):t.mType==MxInputType.kDynTip?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!1,n.list[2].show=!1):n=void 0,n}}}}(),CursorType={kNormal:"cursor3",kRect:"cursor1",kCross:"cursor2"},MxVueInterface=function(){return function(){var t=this;this.mSetCoordFun=void 0,this.mUpdateCursorFun=void 0,this.mOnKeydownEvent=void 0,this.mCursorType=CursorType.kNormal,this.mComandLine=new MxVueComandLine,this.mdynamicInput=new MxDynamicInput,this.mMxEvents={},this.mountSetCoordFun=function(n){t.mSetCoordFun=n},this.mountUpdateCursorFun=function(n){t.mUpdateCursorFun=n},this.mountKeydownEvent=function(n){t.mOnKeydownEvent=n},this.onKeydown=function(n){void 0!=t.mOnKeydownEvent&&t.mOnKeydownEvent(n)},this.setTipCoord=function(n){void 0!=t.mSetCoordFun&&t.mSetCoordFun(n)},this.getCursorType=function(){return t.mCursorType},this.setCursorType=function(n){if("number"==typeof n)switch(n){case 0:t.mCursorType=CursorType.kNormal;break;case 1:t.mCursorType=CursorType.kRect;break;case 2:t.mCursorType=CursorType.kCross}else t.mCursorType=n;void 0!=t.mUpdateCursorFun&&t.mUpdateCursorFun()},this.getTitle=function(){return t.mTitle},this.getTopButtonBarData=function(){return t.mTopButtonBarData},this.getMenuBarData=function(){return t.mMenuBarData},this.getRighButtonBarData=function(){return t.mRighButtonBarData},this.getLeftButtonBarData=function(){return t.mLeftButtonBarData},this.getTitleButtonBarData=function(){return t.mTitleButtonBarData},this.getLayerComboxData=function(){return t.mLayerComboxData},this.getColorComboxData=function(){return t.mColorComboxData},this.getLinetypeComboxData=function(){return t.mLinetypeComboxData},this.getFooterData=function(){return t.mFooterData},this.sendStringToExecute=function(n){t.mxFunObject.sendStringToExecute(n)},this.getCmdLine=function(){return t.mComandLine},this.getDynamicInput=function(){return t.mdynamicInput},this.init=function(n){t.mxFunObject=n},this.OnMxEvent=function(n){var e=n.name;if(void 0!=e){var i=t.mMxEvents[e];void 0!=i&&i(n.param)}},this.mountMxEvent=function(n,e){t.mMxEvents[n]=e}}}();exports.MxVueInterface=MxVueInterface,exports.default=new MxVueInterface;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MxVueInterface=void 0;var MxVueComandLine=function(){function t(){var t=this;this.msCmdText="",this.msCmdDisplay="",this.msCmdTip="",this.mUpDisplayFun=void 0,this.mxFunObject=void 0,this.mountUpDisplayFun=function(n){t.mUpDisplayFun=n},this.setCmdText=function(n){t.msCmdText=n},this.getCmdText=function(){return t.msCmdText},this.getCmdDisplay=function(){return t.msCmdDisplay},this.setCmdDisplay=function(n){t.msCmdDisplay=n},this.addCmdDisplay=function(n){t.msCmdDisplay.length>1024?(t.msCmdDisplay=t.msCmdDisplay.substring(t.msCmdDisplay.length-1024,t.msCmdDisplay.length),t.msCmdDisplay=t.msCmdDisplay+n):t.msCmdDisplay=t.msCmdDisplay+n},this.setCmdTip=function(n){t.msCmdTip=n},this.getCmdTip=function(){return t.msCmdTip}}return t.prototype.upDisplay=function(){var t=this.msCmdTip,n=this.msCmdDisplay,e=this.msCmdText;void 0!=this.mUpDisplayFun&&this.mUpDisplayFun({msCmdTip:t,msCmdDisplay:n,msCmdText:e})},t}(),MxInputType={kNoInput:0,kXYCoordInput:1,kDistanceInput:2,kDynTip:3},MxInputPostionType={kRelative:0,kAbsolutely:1},MxDynamicInput=function(){return function(){var t=this;this.mType=MxInputType.kNoInput,this.mPos=[0,0],this.mTip="",this.mValue1="",this.mValue1Pos=[0,0],this.mValue2="",this.mValue2Pos=[0,0],this.misShow=!1,this.mOnKeydownEvent=void 0,this.mFocusValue="",this.setFocusValue=function(n){t.mFocusValue=n},this.getFocusValue=function(){return t.mFocusValue},this.mountKeydownEvent=function(n){t.mOnKeydownEvent=n},this.onKeydown=function(n){void 0!=t.mOnKeydownEvent&&t.mOnKeydownEvent(n)},this.setType=function(n){t.mType=n},this.getType=function(){return t.mType},this.isShow=function(){return t.misShow},this.setPos=function(n){t.mPos=n},this.setTip=function(n){t.mTip=n},this.setValue1=function(n){t.mValue1=n},this.getValue1=function(){return t.mValue1},this.setValue1Pos=function(n){t.mValue1Pos=n},this.setValue2=function(n){t.mValue2=n},this.getValue2=function(){return t.mValue2},this.setValue2Pos=function(n){t.mValue2Pos=n},this.setShow=function(n){t.misShow=n},this.getData=function(){if(t.misShow){var n={list:[{value:"",readonly:!0},{value:"",readonly:!1},{value:"",readonly:!1}],pos:t.mPos,postype:MxInputPostionType.kRelative};if(t.mType!=MxInputType.kNoInput)return t.mType==MxInputType.kXYCoordInput?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!0,n.list[1].value=t.mValue1,n.list[1].readonly=!1,n.list[2].show=!0,n.list[2].value=t.mValue2,n.list[2].readonly=!1):t.mType==MxInputType.kDistanceInput?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!0,n.list[1].value=t.mValue1,n.list[1].readonly=!1,n.list[1].pos=t.mValue1Pos,n.list[2].show=!0,n.list[2].value=t.mValue2,n.list[2].readonly=!0,n.list[2].pos=t.mValue2Pos,n.postype=MxInputPostionType.kAbsolutely):t.mType==MxInputType.kDynTip?(n.list[0].show=!0,n.list[0].value=t.mTip,n.list[0].readonly=!0,n.list[1].show=!1,n.list[2].show=!1):n=void 0,n}}}}(),CursorType={kNormal:"Normal",kRect:"Rect",kCross:"Cross"},MxVueInterface=function(){return function(){var t=this;this.mSetCoordFun=void 0,this.mUpdateCursorFun=void 0,this.mOnKeydownEvent=void 0,this.mCursorType=CursorType.kNormal,this.mComandLine=new MxVueComandLine,this.mdynamicInput=new MxDynamicInput,this.mMxEvents={},this.mountSetCoordFun=function(n){t.mSetCoordFun=n},this.mountUpdateCursorFun=function(n){t.mUpdateCursorFun=n},this.mountKeydownEvent=function(n){t.mOnKeydownEvent=n},this.onKeydown=function(n){void 0!=t.mOnKeydownEvent&&t.mOnKeydownEvent(n)},this.setTipCoord=function(n){void 0!=t.mSetCoordFun&&t.mSetCoordFun(n)},this.getCursorType=function(){return t.mCursorType},this.setCursorType=function(n){if("number"==typeof n)switch(n){case 0:t.mCursorType=CursorType.kNormal;break;case 1:t.mCursorType=CursorType.kRect;break;case 2:t.mCursorType=CursorType.kCross}else t.mCursorType=n;void 0!=t.mUpdateCursorFun&&t.mUpdateCursorFun(t.mCursorType)},this.getTitle=function(){return t.mTitle},this.getTopButtonBarData=function(){return t.mTopButtonBarData},this.getMenuBarData=function(){return t.mMenuBarData},this.getRighButtonBarData=function(){return t.mRighButtonBarData},this.getLeftButtonBarData=function(){return t.mLeftButtonBarData},this.getTitleButtonBarData=function(){return t.mTitleButtonBarData},this.getLayerComboxData=function(){return t.mLayerComboxData},this.getColorComboxData=function(){return t.mColorComboxData},this.getLinetypeComboxData=function(){return t.mLinetypeComboxData},this.getFooterData=function(){return t.mFooterData},this.sendStringToExecute=function(n){t.mxFunObject.sendStringToExecute(n)},this.getCmdLine=function(){return t.mComandLine},this.getDynamicInput=function(){return t.mdynamicInput},this.init=function(n){t.mxFunObject=n},this.OnMxEvent=function(n){var e=n.name;if(void 0!=e){var i=t.mMxEvents[e];void 0!=i&&i(n.param)}},this.mountMxEvent=function(n,e){t.mMxEvents[n]=e}}}();exports.MxVueInterface=MxVueInterface,exports.default=new MxVueInterface;