You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
104 KiB

5 years ago
/*! Copyright (C) 1998-2019 by Northwoods Software Corporation. All Rights Reserved. */
window.gfp=function(t){var e={};function a(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(n,o,function(e){return t[e]}.bind(null,o));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=3)}([function(t,e){t.exports=window.go},function(t,e,a){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)},function(t,e){function a(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)});Object.defineProperty(e,"__esModule",{value:!0});var i=a(0),r=function(t){function e(){var e=t.call(this)||this;return e._buildingWall=null,e._isBuildingDivider=!1,e.name="WallBuilding",e._startPoint=null,e._endPoint=null,e._wallReshapingTool=null,e._isBuildingDivider=!1,e}return o(e,t),Object.defineProperty(e.prototype,"startPoint",{get:function(){return this._startPoint},set:function(t){this._startPoint=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endPoint",{get:function(){return this._endPoint},set:function(t){this._endPoint=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wallReshapingTool",{get:function(){return this._wallReshapingTool},set:function(t){this._wallReshapingTool=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buildingWall",{get:function(){return this._buildingWall},set:function(t){this._buildingWall=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isBuildingDivider",{get:function(){return this._isBuildingDivider},set:function(t){this._isBuildingDivider=t},enumerable:!0,configurable:!0}),e.prototype.doActivate=function(){this.endPoint=null,this.startTransaction(this.name),this.diagram.isMouseCaptured=!0;var t=this,e=t.diagram,a=t.diagram.lastInput.documentPoint,n=!1,o=e.findNodesByExample({category:"WallGroup"});o.iterator.each(function(o){if(e.isPointInWall(o,a)&&null===t.buildingWall){var i=a.projectOntoLineSegmentPoint(o.data.startpoint,o.data.endpoint);a=i,n=!0}}),o.iterator.each(function(t){var e=t.data.startpoint,o=t.data.endpoint;Math.sqrt(e.distanceSquaredPoint(a))<15&&(a=e,n=!0),Math.sqrt(o.distanceSquaredPoint(a))<15&&(a=o,n=!0)});var r=e.model.modelData.gridSize;t.diagram.toolManager.draggingTool.isGridSnapEnabled&&!n||(r=1e-4);var l=r*Math.round(a.x/r),s=r*Math.round(a.y/r);a=new i.Point(l,s),this.startPoint=a,this.wallReshapingTool=e.toolManager.mouseDownTools.elt(3),this.isActive=!0},e.prototype.doMouseDown=function(){var t=this.diagram;this.diagram.currentCursor="crosshair";var e={key:"wall",category:"WallGroup",caption:this.isBuildingDivider?"Divider":"Wall",type:this.isBuildingDivider?"Divider":"Wall",startpoint:this.startPoint,endpoint:this.startPoint,smpt1:this.startPoint,smpt2:this.startPoint,empt1:this.startPoint,empt2:this.startPoint,thickness:this._isBuildingDivider?.005:parseFloat(t.model.modelData.wallThickness),color:"lightgray",isGroup:!0,notes:"",isDivider:this.isBuildingDivider};this.diagram.model.addNodeData(e);var a=t.findPartForKey(e.key);this.buildingWall=a,t.updateWall(a);var n=t.findPartForData(e);null!==n&&(this.transactionResult=this.name,t.raiseDiagramEvent("PartCreated",n),null!==this.wallReshapingTool&&(this.wallReshapingTool.isEnabled=!0,t.select(n),this.wallReshapingTool
//# sourceMappingURL=gfp.js.map