@xtctwins/tctwins-core 1.0.16 → 1.0.17
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/tctwins-core.cjs.js +1151 -1053
- package/dist/tctwins-core.es.js +1151 -1053
- package/dist/tctwins-core.es5.js +599 -582
- package/dist/tctwins-core.min.cjs.js +2 -2
- package/dist/tctwins-core.min.es.js +2 -2
- package/dist/tctwins-core.min.es5.js +2 -2
- package/package.json +1 -1
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +72 -48
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +73 -49
package/dist/tctwins-core.es5.js
CHANGED
|
@@ -2956,8 +2956,10 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._cornerDot.s
|
|
|
2956
2956
|
* @param {*} [cfg] Configuration
|
|
2957
2957
|
* @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
|
|
2958
2958
|
* @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
|
|
2959
|
-
|
|
2960
|
-
|
|
2959
|
+
* @param {_offsetX} [cfg._offsetX] _offsetX of the mouse
|
|
2960
|
+
* @param {_offsetY} [cfg._offsetY] _offsetY of the mouse
|
|
2961
|
+
* */function AngleMeasurementsMouseControl(angleMeasurementsPlugin){var _this18;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,AngleMeasurementsMouseControl);_this18=_super7.call(this,angleMeasurementsPlugin.viewer.scene);_this18.pointerLens=cfg.pointerLens;_this18._active=false;_this18._mouseState=MOUSE_FINDING_ORIGIN;_this18._currentAngleMeasurement=null;// init markerDiv element (think about making its style configurable)
|
|
2962
|
+
_this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothing=null;_this18._onPickedNothing=null;_this18._onPickedSurface=null;_this18._onInputMouseDown=null;_this18._onInputMouseUp=null;_this18._snapping=cfg.snapping!==false;_this18._attachPlugin(angleMeasurementsPlugin,cfg);_this18._offsetX=cfg._offsetX|0;_this18._offsetY=cfg._offsetY|0;return _this18;}_createClass(AngleMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement("div");markerDiv.setAttribute("id","myAngleMeasureMarker");var canvas=this.scene.canvas.canvas;canvas.parentNode.insertBefore(markerDiv,canvas);markerDiv.style.background="black";markerDiv.style.border="2px solid blue";markerDiv.style.borderRadius="10px";markerDiv.style.width="5px";markerDiv.style.height="5px";markerDiv.style.margin="-200px -200px";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this.markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this.markerDiv){var element=document.getElementById("myAngleMeasureMarker");element.parentNode.removeChild(element);this.markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(angleMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
|
|
2961
2963
|
* The {@link AngleMeasurementsPlugin} that owns this AngleMeasurementsMouseControl.
|
|
2962
2964
|
*
|
|
2963
2965
|
* @type {AngleMeasurementsPlugin}
|
|
@@ -2966,10 +2968,18 @@ _this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothi
|
|
|
2966
2968
|
*
|
|
2967
2969
|
* @type {AngleMeasurementsPlugin}
|
|
2968
2970
|
*/this.plugin=angleMeasurementsPlugin;}/**
|
|
2971
|
+
* @param {number} offsetX
|
|
2972
|
+
*/},{key:"offsetX",get:/**
|
|
2973
|
+
* @return {number} mouse offset
|
|
2974
|
+
*/function get(){return this._offsetX;}/**
|
|
2975
|
+
* @param {number} offsetX
|
|
2976
|
+
*/,set:function set(offsetX){this._offsetX=offsetX;}},{key:"offsetY",get:/**
|
|
2977
|
+
* @return {number} mouse offset
|
|
2978
|
+
*/function get(){return this._offsetY;}/**
|
|
2969
2979
|
* Gets if this AngleMeasurementsMouseControl is currently active, where it is responding to input.
|
|
2970
2980
|
*
|
|
2971
2981
|
* @returns {boolean}
|
|
2972
|
-
|
|
2982
|
+
*/,set:function set(offsetY){this._offsetY=offsetY;}},{key:"active",get:function get(){return this._active;}/**
|
|
2973
2983
|
* Sets whether snap-to-vertex and snap-to-edge are enabled for this AngleMeasurementsMouseControl.
|
|
2974
2984
|
*
|
|
2975
2985
|
* This is `true` by default.
|
|
@@ -2988,7 +2998,7 @@ _this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothi
|
|
|
2988
2998
|
*/function get(){return this._snapping;}/**
|
|
2989
2999
|
* Activates this AngleMeasurementsMouseControl, ready to respond to input.
|
|
2990
3000
|
*/,set:function set(snapping){if(snapping!==this._snapping){this._snapping=snapping;this.deactivate();this.activate();}else{this._snapping=snapping;}}},{key:"activate",value:function activate(){var _this19=this;if(this._active){return;}if(!this.markerDiv){this._initMarkerDiv();// if the marker is destroyed after deactivation, we recreate it
|
|
2991
|
-
}this.angleMeasurementsPlugin;var scene=this.scene;scene.input;var canvas=scene.canvas.canvas;var clickTolerance=20;var cameraControl=this.angleMeasurementsPlugin.viewer.cameraControl;var pointerLens=this.pointerLens;var mouseHovering=false;var hoveredEntity=null;var lastMouseCanvasX=0;var lastMouseCanvasY=0;var mouseWorldPos=math.vec3();var mouseHoverCanvasPos=math.vec2();this._currentAngleMeasurement=null;this._onMouseHoverSurface=cameraControl.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",function(event){if(event.snappedToVertex||event.snappedToEdge){if(pointerLens){pointerLens.visible=true;pointerLens.canvasPos=event.canvasPos;pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;pointerLens.snapped=true;}_this19.markerDiv.style.background="greenyellow";_this19.markerDiv.style.border="2px solid green";}else{if(pointerLens){pointerLens.visible=true;pointerLens.canvasPos=event.canvasPos;pointerLens.snappedCanvasPos=event.canvasPos;pointerLens.snapped=false;}_this19.markerDiv.style.background="pink";_this19.markerDiv.style.border="2px solid red";}var canvasPos=event.snappedCanvasPos||event.canvasPos;mouseHovering=true;hoveredEntity=event.entity;mouseWorldPos.set(event.worldPos);mouseHoverCanvasPos.set(canvasPos);switch(_this19._mouseState){case MOUSE_FINDING_ORIGIN:canvas.getBoundingClientRect();var scrollLeft=window.pageXOffset||document.documentElement.scrollLeft;var scrollTop=window.pageYOffset||document.documentElement.scrollTop;var canvasLeftEdge=scrollLeft;var canvasTopEdge=scrollTop;_this19.markerDiv.style.marginLeft="".concat(canvasLeftEdge+canvasPos[0]-5,"px");_this19.markerDiv.style.marginTop="".concat(canvasTopEdge+canvasPos[1]-5,"px");break;case MOUSE_FINDING_CORNER:if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.originWireVisible=true;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.cornerVisible=true;_this19._currentAngleMeasurement.angleVisible=false;_this19._currentAngleMeasurement.corner.worldPos=event.worldPos;_this19._currentAngleMeasurement.corner.entity=event.entity;}_this19.markerDiv.style.marginLeft="-10000px";_this19.markerDiv.style.marginTop="-10000px";canvas.style.cursor="pointer";break;case MOUSE_FINDING_TARGET:if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.targetWireVisible=true;_this19._currentAngleMeasurement.targetVisible=true;_this19._currentAngleMeasurement.angleVisible=true;_this19._currentAngleMeasurement.target.worldPos=event.worldPos;_this19._currentAngleMeasurement.target.entity=event.entity;}_this19.markerDiv.style.marginLeft="-10000px";_this19.markerDiv.style.marginTop="-10000px";canvas.style.cursor="pointer";break;}});canvas.addEventListener("mousedown",this._onMouseDown=function(e){if(e.which!==1){return;}lastMouseCanvasX=e.clientX;lastMouseCanvasY=e.clientY;});canvas.addEventListener("mouseup",this._onMouseUp=function(e){if(e.which!==1){return;}if(e.clientX>lastMouseCanvasX+clickTolerance||e.clientX<lastMouseCanvasX-clickTolerance||e.clientY>lastMouseCanvasY+clickTolerance||e.clientY<lastMouseCanvasY-clickTolerance){return;}switch(_this19._mouseState){case MOUSE_FINDING_ORIGIN:if(mouseHovering){_this19._currentAngleMeasurement=_this19.angleMeasurementsPlugin.createMeasurement({id:math.createUUID(),origin:{worldPos:mouseWorldPos},corner:{worldPos:mouseWorldPos},target:{worldPos:mouseWorldPos},approximate:true});_this19._currentAngleMeasurement.clickable=false;_this19._currentAngleMeasurement.originVisible=true;_this19._currentAngleMeasurement.originWireVisible=true;_this19._currentAngleMeasurement.cornerVisible=false;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.targetVisible=false;_this19._currentAngleMeasurement.angleVisible=false;_this19._currentAngleMeasurement.origin.entity=hoveredEntity;_this19._mouseState=MOUSE_FINDING_CORNER;_this19.angleMeasurementsPlugin.fire("measurementStart",_this19._currentAngleMeasurement);}break;case MOUSE_FINDING_CORNER:if(mouseHovering){_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.targetVisible=true;_this19._currentAngleMeasurement.angleVisible=true;_this19._currentAngleMeasurement.corner.entity=hoveredEntity;_this19._mouseState=MOUSE_FINDING_TARGET;}else{if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.destroy();_this19._currentAngleMeasurement=null;hoveredEntity=null;_this19._mouseState=MOUSE_FINDING_ORIGIN;_this19.angleMeasurementsPlugin.fire("measurementCancel",_this19._currentAngleMeasurement);}}break;case MOUSE_FINDING_TARGET:if(mouseHovering){_this19._currentAngleMeasurement.targetVisible=true;_this19._currentAngleMeasurement.angleVisible=true;_this19._currentAngleMeasurement.target.entity=hoveredEntity;_this19._currentAngleMeasurement.clickable=true;hoveredEntity=null;_this19.angleMeasurementsPlugin.fire("measurementEnd",_this19._currentAngleMeasurement);_this19._currentAngleMeasurement=null;_this19._mouseState=MOUSE_FINDING_ORIGIN;}else{if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.destroy();_this19._currentAngleMeasurement=null;hoveredEntity=null;_this19._mouseState=MOUSE_FINDING_ORIGIN;_this19.angleMeasurementsPlugin.fire("measurementCancel",_this19._currentAngleMeasurement);}}break;}});this._onMouseHoverOff=cameraControl.on(this._snapping?"hoverSnapOrSurfaceOff":"hoverOff",function(event){mouseHovering=false;if(pointerLens){pointerLens.visible=true;pointerLens.pointerPos=event.canvasPos;pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;pointerLens.snapped=false;}_this19.markerDiv.style.marginLeft="-100px";_this19.markerDiv.style.marginTop="-100px";if(_this19._currentAngleMeasurement){switch(_this19._mouseState){case MOUSE_FINDING_ORIGIN:_this19._currentAngleMeasurement.originVisible=false;break;case MOUSE_FINDING_CORNER:_this19._currentAngleMeasurement.cornerVisible=false;_this19._currentAngleMeasurement.originWireVisible=false;_this19._currentAngleMeasurement.targetVisible=false;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.angleVisible=false;break;case MOUSE_FINDING_TARGET:_this19._currentAngleMeasurement.targetVisible=false;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.angleVisible=false;break;}canvas.style.cursor="default";}});this._active=true;}/**
|
|
3001
|
+
}this.angleMeasurementsPlugin;var scene=this.scene;scene.input;var canvas=scene.canvas.canvas;var clickTolerance=20;var cameraControl=this.angleMeasurementsPlugin.viewer.cameraControl;var pointerLens=this.pointerLens;var mouseHovering=false;var hoveredEntity=null;var lastMouseCanvasX=0;var lastMouseCanvasY=0;var mouseWorldPos=math.vec3();var mouseHoverCanvasPos=math.vec2();this._currentAngleMeasurement=null;this._onMouseHoverSurface=cameraControl.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",function(event){if(event.snappedToVertex||event.snappedToEdge){if(pointerLens){pointerLens.visible=true;pointerLens.canvasPos=event.canvasPos;pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;pointerLens.snapped=true;}_this19.markerDiv.style.background="greenyellow";_this19.markerDiv.style.border="2px solid green";}else{if(pointerLens){pointerLens.visible=true;pointerLens.canvasPos=event.canvasPos;pointerLens.snappedCanvasPos=event.canvasPos;pointerLens.snapped=false;}_this19.markerDiv.style.background="pink";_this19.markerDiv.style.border="2px solid red";}var canvasPos=event.snappedCanvasPos||event.canvasPos;mouseHovering=true;hoveredEntity=event.entity;mouseWorldPos.set(event.worldPos);mouseHoverCanvasPos.set(canvasPos);switch(_this19._mouseState){case MOUSE_FINDING_ORIGIN:canvas.getBoundingClientRect();var scrollLeft=window.pageXOffset||document.documentElement.scrollLeft;var scrollTop=window.pageYOffset||document.documentElement.scrollTop;var canvasLeftEdge=scrollLeft;var canvasTopEdge=scrollTop;_this19.markerDiv.style.marginLeft="".concat(_this19._offsetX+canvasLeftEdge+canvasPos[0]-5,"px");_this19.markerDiv.style.marginTop="".concat(_this19._offsetY+canvasTopEdge+canvasPos[1]-5,"px");break;case MOUSE_FINDING_CORNER:if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.originWireVisible=true;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.cornerVisible=true;_this19._currentAngleMeasurement.angleVisible=false;_this19._currentAngleMeasurement.corner.worldPos=event.worldPos;_this19._currentAngleMeasurement.corner.entity=event.entity;}_this19.markerDiv.style.marginLeft="-10000px";_this19.markerDiv.style.marginTop="-10000px";canvas.style.cursor="pointer";break;case MOUSE_FINDING_TARGET:if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.targetWireVisible=true;_this19._currentAngleMeasurement.targetVisible=true;_this19._currentAngleMeasurement.angleVisible=true;_this19._currentAngleMeasurement.target.worldPos=event.worldPos;_this19._currentAngleMeasurement.target.entity=event.entity;}_this19.markerDiv.style.marginLeft="-10000px";_this19.markerDiv.style.marginTop="-10000px";canvas.style.cursor="pointer";break;}});canvas.addEventListener("mousedown",this._onMouseDown=function(e){if(e.which!==1){return;}lastMouseCanvasX=e.clientX;lastMouseCanvasY=e.clientY;});canvas.addEventListener("mouseup",this._onMouseUp=function(e){if(e.which!==1){return;}if(e.clientX>lastMouseCanvasX+clickTolerance||e.clientX<lastMouseCanvasX-clickTolerance||e.clientY>lastMouseCanvasY+clickTolerance||e.clientY<lastMouseCanvasY-clickTolerance){return;}switch(_this19._mouseState){case MOUSE_FINDING_ORIGIN:if(mouseHovering){_this19._currentAngleMeasurement=_this19.angleMeasurementsPlugin.createMeasurement({id:math.createUUID(),origin:{worldPos:mouseWorldPos},corner:{worldPos:mouseWorldPos},target:{worldPos:mouseWorldPos},approximate:true});_this19._currentAngleMeasurement.clickable=false;_this19._currentAngleMeasurement.originVisible=true;_this19._currentAngleMeasurement.originWireVisible=true;_this19._currentAngleMeasurement.cornerVisible=false;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.targetVisible=false;_this19._currentAngleMeasurement.angleVisible=false;_this19._currentAngleMeasurement.origin.entity=hoveredEntity;_this19._mouseState=MOUSE_FINDING_CORNER;_this19.angleMeasurementsPlugin.fire("measurementStart",_this19._currentAngleMeasurement);}break;case MOUSE_FINDING_CORNER:if(mouseHovering){_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.targetVisible=true;_this19._currentAngleMeasurement.angleVisible=true;_this19._currentAngleMeasurement.corner.entity=hoveredEntity;_this19._mouseState=MOUSE_FINDING_TARGET;}else{if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.destroy();_this19._currentAngleMeasurement=null;hoveredEntity=null;_this19._mouseState=MOUSE_FINDING_ORIGIN;_this19.angleMeasurementsPlugin.fire("measurementCancel",_this19._currentAngleMeasurement);}}break;case MOUSE_FINDING_TARGET:if(mouseHovering){_this19._currentAngleMeasurement.targetVisible=true;_this19._currentAngleMeasurement.angleVisible=true;_this19._currentAngleMeasurement.target.entity=hoveredEntity;_this19._currentAngleMeasurement.clickable=true;hoveredEntity=null;_this19.angleMeasurementsPlugin.fire("measurementEnd",_this19._currentAngleMeasurement);_this19._currentAngleMeasurement=null;_this19._mouseState=MOUSE_FINDING_ORIGIN;}else{if(_this19._currentAngleMeasurement){_this19._currentAngleMeasurement.destroy();_this19._currentAngleMeasurement=null;hoveredEntity=null;_this19._mouseState=MOUSE_FINDING_ORIGIN;_this19.angleMeasurementsPlugin.fire("measurementCancel",_this19._currentAngleMeasurement);}}break;}});this._onMouseHoverOff=cameraControl.on(this._snapping?"hoverSnapOrSurfaceOff":"hoverOff",function(event){mouseHovering=false;if(pointerLens){pointerLens.visible=true;pointerLens.pointerPos=event.canvasPos;pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;pointerLens.snapped=false;}_this19.markerDiv.style.marginLeft="-100px";_this19.markerDiv.style.marginTop="-100px";if(_this19._currentAngleMeasurement){switch(_this19._mouseState){case MOUSE_FINDING_ORIGIN:_this19._currentAngleMeasurement.originVisible=false;break;case MOUSE_FINDING_CORNER:_this19._currentAngleMeasurement.cornerVisible=false;_this19._currentAngleMeasurement.originWireVisible=false;_this19._currentAngleMeasurement.targetVisible=false;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.angleVisible=false;break;case MOUSE_FINDING_TARGET:_this19._currentAngleMeasurement.targetVisible=false;_this19._currentAngleMeasurement.targetWireVisible=false;_this19._currentAngleMeasurement.angleVisible=false;break;}canvas.style.cursor="default";}});this._active=true;}/**
|
|
2992
3002
|
* Deactivates this AngleMeasurementsMouseControl, making it unresponsive to input.
|
|
2993
3003
|
*
|
|
2994
3004
|
* Destroys any {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl.
|
|
@@ -2998,7 +3008,7 @@ _this18._initMarkerDiv();_this18._onMouseHoverSurface=null;_this18._onHoverNothi
|
|
|
2998
3008
|
* Destroys any {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl.
|
|
2999
3009
|
*
|
|
3000
3010
|
* Does nothing if the AngleMeasurementsMouseControl is not active.
|
|
3001
|
-
*/},{key:"reset",value:function reset(){if(!this._active){return;}this._destroyMarkerDiv();this._initMarkerDiv();if(this._currentAngleMeasurement){this._currentAngleMeasurement.destroy();this._currentAngleMeasurement=null;}this._mouseState=MOUSE_FINDING_ORIGIN;}/**
|
|
3011
|
+
*/},{key:"reset",value:function reset(){if(!this._active){return;}this._destroyMarkerDiv();this._initMarkerDiv();if(this._currentAngleMeasurement){this.angleMeasurementsPlugin.fire("measurementCancel",this._currentAngleMeasurement);this._currentAngleMeasurement.destroy();this._currentAngleMeasurement=null;}this._mouseState=MOUSE_FINDING_ORIGIN;}/**
|
|
3002
3012
|
* Destroys this AngleMeasurementsMouseControl.
|
|
3003
3013
|
*/},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(AngleMeasurementsMouseControl.prototype),"destroy",this).call(this);}}]);return AngleMeasurementsMouseControl;}(AngleMeasurementsControl);/**
|
|
3004
3014
|
* {@link Viewer} plugin for measuring angles.
|
|
@@ -4878,554 +4888,551 @@ this._occlusionTester.unbindRenderBuf();}};/**
|
|
|
4878
4888
|
* myViewer.scene.input.setKeyboardEnabled(true)
|
|
4879
4889
|
* ````
|
|
4880
4890
|
*/var Input=/*#__PURE__*/function(_Component8){_inherits(Input,_Component8);var _super13=_createSuper(Input);/**
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
4891
|
+
* @private
|
|
4892
|
+
*/function Input(owner){var _this32;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,Input);_this32=_super13.call(this,owner,cfg);/**
|
|
4893
|
+
* Code for the BACKSPACE key.
|
|
4894
|
+
* @property KEY_BACKSPACE
|
|
4895
|
+
* @final
|
|
4896
|
+
* @type {Number}
|
|
4897
|
+
*/_this32.KEY_BACKSPACE=8;/**
|
|
4898
|
+
* Code for the TAB key.
|
|
4899
|
+
* @property KEY_TAB
|
|
4900
|
+
* @final
|
|
4901
|
+
* @type {Number}
|
|
4902
|
+
*/_this32.KEY_TAB=9;/**
|
|
4903
|
+
* Code for the ENTER key.
|
|
4904
|
+
* @property KEY_ENTER
|
|
4905
|
+
* @final
|
|
4906
|
+
* @type {Number}
|
|
4907
|
+
*/_this32.KEY_ENTER=13;/**
|
|
4908
|
+
* Code for the SHIFT key.
|
|
4909
|
+
* @property KEY_SHIFT
|
|
4910
|
+
* @final
|
|
4911
|
+
* @type {Number}
|
|
4912
|
+
*/_this32.KEY_SHIFT=16;/**
|
|
4913
|
+
* Code for the CTRL key.
|
|
4914
|
+
* @property KEY_CTRL
|
|
4915
|
+
* @final
|
|
4916
|
+
* @type {Number}
|
|
4917
|
+
*/_this32.KEY_CTRL=17;/**
|
|
4918
|
+
* Code for the ALT key.
|
|
4919
|
+
* @property KEY_ALT
|
|
4920
|
+
* @final
|
|
4921
|
+
* @type {Number}
|
|
4922
|
+
*/_this32.KEY_ALT=18;/**
|
|
4923
|
+
* Code for the PAUSE_BREAK key.
|
|
4924
|
+
* @property KEY_PAUSE_BREAK
|
|
4925
|
+
* @final
|
|
4926
|
+
* @type {Number}
|
|
4927
|
+
*/_this32.KEY_PAUSE_BREAK=19;/**
|
|
4928
|
+
* Code for the CAPS_LOCK key.
|
|
4929
|
+
* @property KEY_CAPS_LOCK
|
|
4930
|
+
* @final
|
|
4931
|
+
* @type {Number}
|
|
4932
|
+
*/_this32.KEY_CAPS_LOCK=20;/**
|
|
4933
|
+
* Code for the ESCAPE key.
|
|
4934
|
+
* @property KEY_ESCAPE
|
|
4935
|
+
* @final
|
|
4936
|
+
* @type {Number}
|
|
4937
|
+
*/_this32.KEY_ESCAPE=27;/**
|
|
4938
|
+
* Code for the PAGE_UP key.
|
|
4939
|
+
* @property KEY_PAGE_UP
|
|
4940
|
+
* @final
|
|
4941
|
+
* @type {Number}
|
|
4942
|
+
*/_this32.KEY_PAGE_UP=33;/**
|
|
4943
|
+
* Code for the PAGE_DOWN key.
|
|
4944
|
+
* @property KEY_PAGE_DOWN
|
|
4945
|
+
* @final
|
|
4946
|
+
* @type {Number}
|
|
4947
|
+
*/_this32.KEY_PAGE_DOWN=34;/**
|
|
4948
|
+
* Code for the END key.
|
|
4949
|
+
* @property KEY_END
|
|
4950
|
+
* @final
|
|
4951
|
+
* @type {Number}
|
|
4952
|
+
*/_this32.KEY_END=35;/**
|
|
4953
|
+
* Code for the HOME key.
|
|
4954
|
+
* @property KEY_HOME
|
|
4955
|
+
* @final
|
|
4956
|
+
* @type {Number}
|
|
4957
|
+
*/_this32.KEY_HOME=36;/**
|
|
4958
|
+
* Code for the LEFT_ARROW key.
|
|
4959
|
+
* @property KEY_LEFT_ARROW
|
|
4960
|
+
* @final
|
|
4961
|
+
* @type {Number}
|
|
4962
|
+
*/_this32.KEY_LEFT_ARROW=37;/**
|
|
4963
|
+
* Code for the UP_ARROW key.
|
|
4964
|
+
* @property KEY_UP_ARROW
|
|
4965
|
+
* @final
|
|
4966
|
+
* @type {Number}
|
|
4967
|
+
*/_this32.KEY_UP_ARROW=38;/**
|
|
4968
|
+
* Code for the RIGHT_ARROW key.
|
|
4969
|
+
* @property KEY_RIGHT_ARROW
|
|
4970
|
+
* @final
|
|
4971
|
+
* @type {Number}
|
|
4972
|
+
*/_this32.KEY_RIGHT_ARROW=39;/**
|
|
4973
|
+
* Code for the DOWN_ARROW key.
|
|
4974
|
+
* @property KEY_DOWN_ARROW
|
|
4975
|
+
* @final
|
|
4976
|
+
* @type {Number}
|
|
4977
|
+
*/_this32.KEY_DOWN_ARROW=40;/**
|
|
4978
|
+
* Code for the INSERT key.
|
|
4979
|
+
* @property KEY_INSERT
|
|
4980
|
+
* @final
|
|
4981
|
+
* @type {Number}
|
|
4982
|
+
*/_this32.KEY_INSERT=45;/**
|
|
4983
|
+
* Code for the DELETE key.
|
|
4984
|
+
* @property KEY_DELETE
|
|
4985
|
+
* @final
|
|
4986
|
+
* @type {Number}
|
|
4987
|
+
*/_this32.KEY_DELETE=46;/**
|
|
4988
|
+
* Code for the 0 key.
|
|
4989
|
+
* @property KEY_NUM_0
|
|
4990
|
+
* @final
|
|
4991
|
+
* @type {Number}
|
|
4992
|
+
*/_this32.KEY_NUM_0=48;/**
|
|
4993
|
+
* Code for the 1 key.
|
|
4994
|
+
* @property KEY_NUM_1
|
|
4995
|
+
* @final
|
|
4996
|
+
* @type {Number}
|
|
4997
|
+
*/_this32.KEY_NUM_1=49;/**
|
|
4998
|
+
* Code for the 2 key.
|
|
4999
|
+
* @property KEY_NUM_2
|
|
5000
|
+
* @final
|
|
5001
|
+
* @type {Number}
|
|
5002
|
+
*/_this32.KEY_NUM_2=50;/**
|
|
5003
|
+
* Code for the 3 key.
|
|
5004
|
+
* @property KEY_NUM_3
|
|
5005
|
+
* @final
|
|
5006
|
+
* @type {Number}
|
|
5007
|
+
*/_this32.KEY_NUM_3=51;/**
|
|
5008
|
+
* Code for the 4 key.
|
|
5009
|
+
* @property KEY_NUM_4
|
|
5010
|
+
* @final
|
|
5011
|
+
* @type {Number}
|
|
5012
|
+
*/_this32.KEY_NUM_4=52;/**
|
|
5013
|
+
* Code for the 5 key.
|
|
5014
|
+
* @property KEY_NUM_5
|
|
5015
|
+
* @final
|
|
5016
|
+
* @type {Number}
|
|
5017
|
+
*/_this32.KEY_NUM_5=53;/**
|
|
5018
|
+
* Code for the 6 key.
|
|
5019
|
+
* @property KEY_NUM_6
|
|
5020
|
+
* @final
|
|
5021
|
+
* @type {Number}
|
|
5022
|
+
*/_this32.KEY_NUM_6=54;/**
|
|
5023
|
+
* Code for the 7 key.
|
|
5024
|
+
* @property KEY_NUM_7
|
|
5025
|
+
* @final
|
|
5026
|
+
* @type {Number}
|
|
5027
|
+
*/_this32.KEY_NUM_7=55;/**
|
|
5028
|
+
* Code for the 8 key.
|
|
5029
|
+
* @property KEY_NUM_8
|
|
5030
|
+
* @final
|
|
5031
|
+
* @type {Number}
|
|
5032
|
+
*/_this32.KEY_NUM_8=56;/**
|
|
5033
|
+
* Code for the 9 key.
|
|
5034
|
+
* @property KEY_NUM_9
|
|
5035
|
+
* @final
|
|
5036
|
+
* @type {Number}
|
|
5037
|
+
*/_this32.KEY_NUM_9=57;/**
|
|
5038
|
+
* Code for the A key.
|
|
5039
|
+
* @property KEY_A
|
|
5040
|
+
* @final
|
|
5041
|
+
* @type {Number}
|
|
5042
|
+
*/_this32.KEY_A=65;/**
|
|
5043
|
+
* Code for the B key.
|
|
5044
|
+
* @property KEY_B
|
|
5045
|
+
* @final
|
|
5046
|
+
* @type {Number}
|
|
5047
|
+
*/_this32.KEY_B=66;/**
|
|
5048
|
+
* Code for the C key.
|
|
5049
|
+
* @property KEY_C
|
|
5050
|
+
* @final
|
|
5051
|
+
* @type {Number}
|
|
5052
|
+
*/_this32.KEY_C=67;/**
|
|
5053
|
+
* Code for the D key.
|
|
5054
|
+
* @property KEY_D
|
|
5055
|
+
* @final
|
|
5056
|
+
* @type {Number}
|
|
5057
|
+
*/_this32.KEY_D=68;/**
|
|
5058
|
+
* Code for the E key.
|
|
5059
|
+
* @property KEY_E
|
|
5060
|
+
* @final
|
|
5061
|
+
* @type {Number}
|
|
5062
|
+
*/_this32.KEY_E=69;/**
|
|
5063
|
+
* Code for the F key.
|
|
5064
|
+
* @property KEY_F
|
|
5065
|
+
* @final
|
|
5066
|
+
* @type {Number}
|
|
5067
|
+
*/_this32.KEY_F=70;/**
|
|
5068
|
+
* Code for the G key.
|
|
5069
|
+
* @property KEY_G
|
|
5070
|
+
* @final
|
|
5071
|
+
* @type {Number}
|
|
5072
|
+
*/_this32.KEY_G=71;/**
|
|
5073
|
+
* Code for the H key.
|
|
5074
|
+
* @property KEY_H
|
|
5075
|
+
* @final
|
|
5076
|
+
* @type {Number}
|
|
5077
|
+
*/_this32.KEY_H=72;/**
|
|
5078
|
+
* Code for the I key.
|
|
5079
|
+
* @property KEY_I
|
|
5080
|
+
* @final
|
|
5081
|
+
* @type {Number}
|
|
5082
|
+
*/_this32.KEY_I=73;/**
|
|
5083
|
+
* Code for the J key.
|
|
5084
|
+
* @property KEY_J
|
|
5085
|
+
* @final
|
|
5086
|
+
* @type {Number}
|
|
5087
|
+
*/_this32.KEY_J=74;/**
|
|
5088
|
+
* Code for the K key.
|
|
5089
|
+
* @property KEY_K
|
|
5090
|
+
* @final
|
|
5091
|
+
* @type {Number}
|
|
5092
|
+
*/_this32.KEY_K=75;/**
|
|
5093
|
+
* Code for the L key.
|
|
5094
|
+
* @property KEY_L
|
|
5095
|
+
* @final
|
|
5096
|
+
* @type {Number}
|
|
5097
|
+
*/_this32.KEY_L=76;/**
|
|
5098
|
+
* Code for the M key.
|
|
5099
|
+
* @property KEY_M
|
|
5100
|
+
* @final
|
|
5101
|
+
* @type {Number}
|
|
5102
|
+
*/_this32.KEY_M=77;/**
|
|
5103
|
+
* Code for the N key.
|
|
5104
|
+
* @property KEY_N
|
|
5105
|
+
* @final
|
|
5106
|
+
* @type {Number}
|
|
5107
|
+
*/_this32.KEY_N=78;/**
|
|
5108
|
+
* Code for the O key.
|
|
5109
|
+
* @property KEY_O
|
|
5110
|
+
* @final
|
|
5111
|
+
* @type {Number}
|
|
5112
|
+
*/_this32.KEY_O=79;/**
|
|
5113
|
+
* Code for the P key.
|
|
5114
|
+
* @property KEY_P
|
|
5115
|
+
* @final
|
|
5116
|
+
* @type {Number}
|
|
5117
|
+
*/_this32.KEY_P=80;/**
|
|
5118
|
+
* Code for the Q key.
|
|
5119
|
+
* @property KEY_Q
|
|
5120
|
+
* @final
|
|
5121
|
+
* @type {Number}
|
|
5122
|
+
*/_this32.KEY_Q=81;/**
|
|
5123
|
+
* Code for the R key.
|
|
5124
|
+
* @property KEY_R
|
|
5125
|
+
* @final
|
|
5126
|
+
* @type {Number}
|
|
5127
|
+
*/_this32.KEY_R=82;/**
|
|
5128
|
+
* Code for the S key.
|
|
5129
|
+
* @property KEY_S
|
|
5130
|
+
* @final
|
|
5131
|
+
* @type {Number}
|
|
5132
|
+
*/_this32.KEY_S=83;/**
|
|
5133
|
+
* Code for the T key.
|
|
5134
|
+
* @property KEY_T
|
|
5135
|
+
* @final
|
|
5136
|
+
* @type {Number}
|
|
5137
|
+
*/_this32.KEY_T=84;/**
|
|
5138
|
+
* Code for the U key.
|
|
5139
|
+
* @property KEY_U
|
|
5140
|
+
* @final
|
|
5141
|
+
* @type {Number}
|
|
5142
|
+
*/_this32.KEY_U=85;/**
|
|
5143
|
+
* Code for the V key.
|
|
5144
|
+
* @property KEY_V
|
|
5145
|
+
* @final
|
|
5146
|
+
* @type {Number}
|
|
5147
|
+
*/_this32.KEY_V=86;/**
|
|
5148
|
+
* Code for the W key.
|
|
5149
|
+
* @property KEY_W
|
|
5150
|
+
* @final
|
|
5151
|
+
* @type {Number}
|
|
5152
|
+
*/_this32.KEY_W=87;/**
|
|
5153
|
+
* Code for the X key.
|
|
5154
|
+
* @property KEY_X
|
|
5155
|
+
* @final
|
|
5156
|
+
* @type {Number}
|
|
5157
|
+
*/_this32.KEY_X=88;/**
|
|
5158
|
+
* Code for the Y key.
|
|
5159
|
+
* @property KEY_Y
|
|
5160
|
+
* @final
|
|
5161
|
+
* @type {Number}
|
|
5162
|
+
*/_this32.KEY_Y=89;/**
|
|
5163
|
+
* Code for the Z key.
|
|
5164
|
+
* @property KEY_Z
|
|
5165
|
+
* @final
|
|
5166
|
+
* @type {Number}
|
|
5167
|
+
*/_this32.KEY_Z=90;/**
|
|
5168
|
+
* Code for the LEFT_WINDOW key.
|
|
5169
|
+
* @property KEY_LEFT_WINDOW
|
|
5170
|
+
* @final
|
|
5171
|
+
* @type {Number}
|
|
5172
|
+
*/_this32.KEY_LEFT_WINDOW=91;/**
|
|
5173
|
+
* Code for the RIGHT_WINDOW key.
|
|
5174
|
+
* @property KEY_RIGHT_WINDOW
|
|
5175
|
+
* @final
|
|
5176
|
+
* @type {Number}
|
|
5177
|
+
*/_this32.KEY_RIGHT_WINDOW=92;/**
|
|
5178
|
+
* Code for the SELECT key.
|
|
5179
|
+
* @property KEY_SELECT
|
|
5180
|
+
* @final
|
|
5181
|
+
* @type {Number}
|
|
5182
|
+
*/_this32.KEY_SELECT_KEY=93;/**
|
|
5183
|
+
* Code for the number pad 0 key.
|
|
5184
|
+
* @property KEY_NUMPAD_0
|
|
5185
|
+
* @final
|
|
5186
|
+
* @type {Number}
|
|
5187
|
+
*/_this32.KEY_NUMPAD_0=96;/**
|
|
5188
|
+
* Code for the number pad 1 key.
|
|
5189
|
+
* @property KEY_NUMPAD_1
|
|
5190
|
+
* @final
|
|
5191
|
+
* @type {Number}
|
|
5192
|
+
*/_this32.KEY_NUMPAD_1=97;/**
|
|
5193
|
+
* Code for the number pad 2 key.
|
|
5194
|
+
* @property KEY_NUMPAD 2
|
|
5195
|
+
* @final
|
|
5196
|
+
* @type {Number}
|
|
5197
|
+
*/_this32.KEY_NUMPAD_2=98;/**
|
|
5198
|
+
* Code for the number pad 3 key.
|
|
5199
|
+
* @property KEY_NUMPAD_3
|
|
5200
|
+
* @final
|
|
5201
|
+
* @type {Number}
|
|
5202
|
+
*/_this32.KEY_NUMPAD_3=99;/**
|
|
5203
|
+
* Code for the number pad 4 key.
|
|
5204
|
+
* @property KEY_NUMPAD_4
|
|
5205
|
+
* @final
|
|
5206
|
+
* @type {Number}
|
|
5207
|
+
*/_this32.KEY_NUMPAD_4=100;/**
|
|
5208
|
+
* Code for the number pad 5 key.
|
|
5209
|
+
* @property KEY_NUMPAD_5
|
|
5210
|
+
* @final
|
|
5211
|
+
* @type {Number}
|
|
5212
|
+
*/_this32.KEY_NUMPAD_5=101;/**
|
|
5213
|
+
* Code for the number pad 6 key.
|
|
5214
|
+
* @property KEY_NUMPAD_6
|
|
5215
|
+
* @final
|
|
5216
|
+
* @type {Number}
|
|
5217
|
+
*/_this32.KEY_NUMPAD_6=102;/**
|
|
5218
|
+
* Code for the number pad 7 key.
|
|
5219
|
+
* @property KEY_NUMPAD_7
|
|
5220
|
+
* @final
|
|
5221
|
+
* @type {Number}
|
|
5222
|
+
*/_this32.KEY_NUMPAD_7=103;/**
|
|
5223
|
+
* Code for the number pad 8 key.
|
|
5224
|
+
* @property KEY_NUMPAD_8
|
|
5225
|
+
* @final
|
|
5226
|
+
* @type {Number}
|
|
5227
|
+
*/_this32.KEY_NUMPAD_8=104;/**
|
|
5228
|
+
* Code for the number pad 9 key.
|
|
5229
|
+
* @property KEY_NUMPAD_9
|
|
5230
|
+
* @final
|
|
5231
|
+
* @type {Number}
|
|
5232
|
+
*/_this32.KEY_NUMPAD_9=105;/**
|
|
5233
|
+
* Code for the MULTIPLY key.
|
|
5234
|
+
* @property KEY_MULTIPLY
|
|
5235
|
+
* @final
|
|
5236
|
+
* @type {Number}
|
|
5237
|
+
*/_this32.KEY_MULTIPLY=106;/**
|
|
5238
|
+
* Code for the ADD key.
|
|
5239
|
+
* @property KEY_ADD
|
|
5240
|
+
* @final
|
|
5241
|
+
* @type {Number}
|
|
5242
|
+
*/_this32.KEY_ADD=107;/**
|
|
5243
|
+
* Code for the SUBTRACT key.
|
|
5244
|
+
* @property KEY_SUBTRACT
|
|
5245
|
+
* @final
|
|
5246
|
+
* @type {Number}
|
|
5247
|
+
*/_this32.KEY_SUBTRACT=109;/**
|
|
5248
|
+
* Code for the DECIMAL POINT key.
|
|
5249
|
+
* @property KEY_DECIMAL_POINT
|
|
5250
|
+
* @final
|
|
5251
|
+
* @type {Number}
|
|
5252
|
+
*/_this32.KEY_DECIMAL_POINT=110;/**
|
|
5253
|
+
* Code for the DIVIDE key.
|
|
5254
|
+
* @property KEY_DIVIDE
|
|
5255
|
+
* @final
|
|
5256
|
+
* @type {Number}
|
|
5257
|
+
*/_this32.KEY_DIVIDE=111;/**
|
|
5258
|
+
* Code for the F1 key.
|
|
5259
|
+
* @property KEY_F1
|
|
5260
|
+
* @final
|
|
5261
|
+
* @type {Number}
|
|
5262
|
+
*/_this32.KEY_F1=112;/**
|
|
5263
|
+
* Code for the F2 key.
|
|
5264
|
+
* @property KEY_F2
|
|
5265
|
+
* @final
|
|
5266
|
+
* @type {Number}
|
|
5267
|
+
*/_this32.KEY_F2=113;/**
|
|
5268
|
+
* Code for the F3 key.
|
|
5269
|
+
* @property KEY_F3
|
|
5270
|
+
* @final
|
|
5271
|
+
* @type {Number}
|
|
5272
|
+
*/_this32.KEY_F3=114;/**
|
|
5273
|
+
* Code for the F4 key.
|
|
5274
|
+
* @property KEY_F4
|
|
5275
|
+
* @final
|
|
5276
|
+
* @type {Number}
|
|
5277
|
+
*/_this32.KEY_F4=115;/**
|
|
5278
|
+
* Code for the F5 key.
|
|
5279
|
+
* @property KEY_F5
|
|
5280
|
+
* @final
|
|
5281
|
+
* @type {Number}
|
|
5282
|
+
*/_this32.KEY_F5=116;/**
|
|
5283
|
+
* Code for the F6 key.
|
|
5284
|
+
* @property KEY_F6
|
|
5285
|
+
* @final
|
|
5286
|
+
* @type {Number}
|
|
5287
|
+
*/_this32.KEY_F6=117;/**
|
|
5288
|
+
* Code for the F7 key.
|
|
5289
|
+
* @property KEY_F7
|
|
5290
|
+
* @final
|
|
5291
|
+
* @type {Number}
|
|
5292
|
+
*/_this32.KEY_F7=118;/**
|
|
5293
|
+
* Code for the F8 key.
|
|
5294
|
+
* @property KEY_F8
|
|
5295
|
+
* @final
|
|
5296
|
+
* @type {Number}
|
|
5297
|
+
*/_this32.KEY_F8=119;/**
|
|
5298
|
+
* Code for the F9 key.
|
|
5299
|
+
* @property KEY_F9
|
|
5300
|
+
* @final
|
|
5301
|
+
* @type {Number}
|
|
5302
|
+
*/_this32.KEY_F9=120;/**
|
|
5303
|
+
* Code for the F10 key.
|
|
5304
|
+
* @property KEY_F10
|
|
5305
|
+
* @final
|
|
5306
|
+
* @type {Number}
|
|
5307
|
+
*/_this32.KEY_F10=121;/**
|
|
5308
|
+
* Code for the F11 key.
|
|
5309
|
+
* @property KEY_F11
|
|
5310
|
+
* @final
|
|
5311
|
+
* @type {Number}
|
|
5312
|
+
*/_this32.KEY_F11=122;/**
|
|
5313
|
+
* Code for the F12 key.
|
|
5314
|
+
* @property KEY_F12
|
|
5315
|
+
* @final
|
|
5316
|
+
* @type {Number}
|
|
5317
|
+
*/_this32.KEY_F12=123;/**
|
|
5318
|
+
* Code for the NUM_LOCK key.
|
|
5319
|
+
* @property KEY_NUM_LOCK
|
|
5320
|
+
* @final
|
|
5321
|
+
* @type {Number}
|
|
5322
|
+
*/_this32.KEY_NUM_LOCK=144;/**
|
|
5323
|
+
* Code for the SCROLL_LOCK key.
|
|
5324
|
+
* @property KEY_SCROLL_LOCK
|
|
5325
|
+
* @final
|
|
5326
|
+
* @type {Number}
|
|
5327
|
+
*/_this32.KEY_SCROLL_LOCK=145;/**
|
|
5328
|
+
* Code for the SEMI_COLON key.
|
|
5329
|
+
* @property KEY_SEMI_COLON
|
|
5330
|
+
* @final
|
|
5331
|
+
* @type {Number}
|
|
5332
|
+
*/_this32.KEY_SEMI_COLON=186;/**
|
|
5333
|
+
* Code for the EQUAL_SIGN key.
|
|
5334
|
+
* @property KEY_EQUAL_SIGN
|
|
5335
|
+
* @final
|
|
5336
|
+
* @type {Number}
|
|
5337
|
+
*/_this32.KEY_EQUAL_SIGN=187;/**
|
|
5338
|
+
* Code for the COMMA key.
|
|
5339
|
+
* @property KEY_COMMA
|
|
5340
|
+
* @final
|
|
5341
|
+
* @type {Number}
|
|
5342
|
+
*/_this32.KEY_COMMA=188;/**
|
|
5343
|
+
* Code for the DASH key.
|
|
5344
|
+
* @property KEY_DASH
|
|
5345
|
+
* @final
|
|
5346
|
+
* @type {Number}
|
|
5347
|
+
*/_this32.KEY_DASH=189;/**
|
|
5348
|
+
* Code for the PERIOD key.
|
|
5349
|
+
* @property KEY_PERIOD
|
|
5350
|
+
* @final
|
|
5351
|
+
* @type {Number}
|
|
5352
|
+
*/_this32.KEY_PERIOD=190;/**
|
|
5353
|
+
* Code for the FORWARD_SLASH key.
|
|
5354
|
+
* @property KEY_FORWARD_SLASH
|
|
5355
|
+
* @final
|
|
5356
|
+
* @type {Number}
|
|
5357
|
+
*/_this32.KEY_FORWARD_SLASH=191;/**
|
|
5358
|
+
* Code for the GRAVE_ACCENT key.
|
|
5359
|
+
* @property KEY_GRAVE_ACCENT
|
|
5360
|
+
* @final
|
|
5361
|
+
* @type {Number}
|
|
5362
|
+
*/_this32.KEY_GRAVE_ACCENT=192;/**
|
|
5363
|
+
* Code for the OPEN_BRACKET key.
|
|
5364
|
+
* @property KEY_OPEN_BRACKET
|
|
5365
|
+
* @final
|
|
5366
|
+
* @type {Number}
|
|
5367
|
+
*/_this32.KEY_OPEN_BRACKET=219;/**
|
|
5368
|
+
* Code for the BACK_SLASH key.
|
|
5369
|
+
* @property KEY_BACK_SLASH
|
|
5370
|
+
* @final
|
|
5371
|
+
* @type {Number}
|
|
5372
|
+
*/_this32.KEY_BACK_SLASH=220;/**
|
|
5373
|
+
* Code for the CLOSE_BRACKET key.
|
|
5374
|
+
* @property KEY_CLOSE_BRACKET
|
|
5375
|
+
* @final
|
|
5376
|
+
* @type {Number}
|
|
5377
|
+
*/_this32.KEY_CLOSE_BRACKET=221;/**
|
|
5378
|
+
* Code for the SINGLE_QUOTE key.
|
|
5379
|
+
* @property KEY_SINGLE_QUOTE
|
|
5380
|
+
* @final
|
|
5381
|
+
* @type {Number}
|
|
5382
|
+
*/_this32.KEY_SINGLE_QUOTE=222;/**
|
|
5383
|
+
* Code for the SPACE key.
|
|
5384
|
+
* @property KEY_SPACE
|
|
5385
|
+
* @final
|
|
5386
|
+
* @type {Number}
|
|
5387
|
+
*/_this32.KEY_SPACE=32;/**
|
|
5388
|
+
* The canvas element that mouse and keyboards are bound to.
|
|
5389
|
+
*
|
|
5390
|
+
* @final
|
|
5391
|
+
* @type {HTMLCanvasElement}
|
|
5392
|
+
*/_this32.element=cfg.element;/** True whenever ALT key is down.
|
|
5393
|
+
*
|
|
5394
|
+
* @type {boolean}
|
|
5395
|
+
*/_this32.altDown=false;/** True whenever CTRL key is down.
|
|
5396
|
+
*
|
|
5397
|
+
* @type {boolean}
|
|
5398
|
+
*/_this32.ctrlDown=false;/** True whenever left mouse button is down.
|
|
5399
|
+
*
|
|
5400
|
+
* @type {boolean}
|
|
5401
|
+
*/_this32.mouseDownLeft=false;/**
|
|
5402
|
+
* True whenever middle mouse button is down.
|
|
5403
|
+
*
|
|
5404
|
+
* @type {boolean}
|
|
5405
|
+
*/_this32.mouseDownMiddle=false;/**
|
|
5406
|
+
* True whenever the right mouse button is down.
|
|
5407
|
+
*
|
|
5408
|
+
* @type {boolean}
|
|
5409
|
+
*/_this32.mouseDownRight=false;/**
|
|
5410
|
+
* Flag for each key that's down.
|
|
5411
|
+
*
|
|
5412
|
+
* @type {boolean[]}
|
|
5413
|
+
*/_this32.keyDown=[];/** True while input enabled
|
|
5414
|
+
*
|
|
5415
|
+
* @type {boolean}
|
|
5416
|
+
*/_this32.enabled=true;/** True while keyboard input is enabled.
|
|
5417
|
+
*
|
|
5418
|
+
* Default value is ````true````.
|
|
5419
|
+
*
|
|
5420
|
+
* {@link CameraControl} will not respond to keyboard events while this is ````false````.
|
|
5421
|
+
*
|
|
5422
|
+
* @type {boolean}
|
|
5423
|
+
*/_this32.keyboardEnabled=true;/** True while the mouse is over the canvas.
|
|
5424
|
+
*
|
|
5425
|
+
* @type {boolean}
|
|
5426
|
+
*/_this32.mouseover=false;/**
|
|
5427
|
+
* Current mouse position within the canvas.
|
|
5428
|
+
* @type {Number[]}
|
|
5429
|
+
*/_this32.mouseCanvasPos=math.vec2();_this32._keyboardEventsElement=cfg.keyboardEventsElement||document;_this32._bindEvents();return _this32;}_createClass(Input,[{key:"_bindEvents",value:function _bindEvents(){var _this33=this;if(this._eventsBound){return;}this._keyboardEventsElement.addEventListener("keydown",this._keyDownListener=function(e){if(!_this33.enabled||!_this33.keyboardEnabled){return;}if(e.target.tagName!=="INPUT"&&e.target.tagName!=="TEXTAREA"){if(e.keyCode===_this33.KEY_CTRL){_this33.ctrlDown=true;}else if(e.keyCode===_this33.KEY_ALT){_this33.altDown=true;}else if(e.keyCode===_this33.KEY_SHIFT){_this33.shiftDown=true;}_this33.keyDown[e.keyCode]=true;_this33.fire("keydown",e.keyCode,true);}},false);this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=function(e){if(!_this33.enabled||!_this33.keyboardEnabled){return;}if(e.target.tagName!=="INPUT"&&e.target.tagName!=="TEXTAREA"){if(e.keyCode===_this33.KEY_CTRL){_this33.ctrlDown=false;}else if(e.keyCode===_this33.KEY_ALT){_this33.altDown=false;}else if(e.keyCode===_this33.KEY_SHIFT){_this33.shiftDown=false;}_this33.keyDown[e.keyCode]=false;_this33.fire("keyup",e.keyCode,true);}});this.element.addEventListener("mouseenter",this._mouseEnterListener=function(e){if(!_this33.enabled){return;}_this33.mouseover=true;_this33._getMouseCanvasPos(e);_this33.fire("mouseenter",_this33.mouseCanvasPos,true);});this.element.addEventListener("mouseleave",this._mouseLeaveListener=function(e){if(!_this33.enabled){return;}_this33.mouseover=false;_this33._getMouseCanvasPos(e);_this33.fire("mouseleave",_this33.mouseCanvasPos,true);});this.element.addEventListener("mousedown",this._mouseDownListener=function(e){if(!_this33.enabled){return;}switch(e.which){case 1:// Left button
|
|
5420
5430
|
_this33.mouseDownLeft=true;break;case 2:// Middle/both buttons
|
|
5421
5431
|
_this33.mouseDownMiddle=true;break;case 3:// Right button
|
|
5422
5432
|
_this33.mouseDownRight=true;break;}_this33._getMouseCanvasPos(e);_this33.element.focus();_this33.fire("mousedown",_this33.mouseCanvasPos,true);if(_this33.mouseover){e.preventDefault();}});document.addEventListener("mouseup",this._mouseUpListener=function(e){if(!_this33.enabled){return;}switch(e.which){case 1:// Left button
|
|
5423
5433
|
_this33.mouseDownLeft=false;break;case 2:// Middle/both buttons
|
|
5424
5434
|
_this33.mouseDownMiddle=false;break;case 3:// Right button
|
|
5425
|
-
_this33.mouseDownRight=false;break;}_this33.fire("mouseup",_this33.mouseCanvasPos,true)
|
|
5426
|
-
// e.preventDefault();
|
|
5427
|
-
// }
|
|
5428
|
-
},true);document.addEventListener("click",this._clickListener=function(e){if(!_this33.enabled){return;}switch(e.which){case 1:// Left button
|
|
5435
|
+
_this33.mouseDownRight=false;break;}_this33.fire("mouseup",_this33.mouseCanvasPos,true);if(_this33.mouseover){e.preventDefault();}},true);document.addEventListener("click",this._clickListener=function(e){if(!_this33.enabled){return;}switch(e.which){case 1:// Left button
|
|
5429
5436
|
_this33.mouseDownLeft=false;_this33.mouseDownRight=false;break;case 2:// Middle/both buttons
|
|
5430
5437
|
_this33.mouseDownMiddle=false;break;case 3:// Right button
|
|
5431
5438
|
_this33.mouseDownLeft=false;_this33.mouseDownRight=false;break;}_this33._getMouseCanvasPos(e);_this33.fire("click",_this33.mouseCanvasPos,true);if(_this33.mouseover){e.preventDefault();}});document.addEventListener("dblclick",this._dblClickListener=function(e){if(!_this33.enabled){return;}switch(e.which){case 1:// Left button
|
|
@@ -5433,37 +5440,37 @@ _this33.mouseDownLeft=false;_this33.mouseDownRight=false;break;case 2:// Middle/
|
|
|
5433
5440
|
_this33.mouseDownMiddle=false;break;case 3:// Right button
|
|
5434
5441
|
_this33.mouseDownLeft=false;_this33.mouseDownRight=false;break;}_this33._getMouseCanvasPos(e);_this33.fire("dblclick",_this33.mouseCanvasPos,true);if(_this33.mouseover){e.preventDefault();}});var tickifedMouseMoveFn=this.scene.tickify(function(){return _this33.fire("mousemove",_this33.mouseCanvasPos,true);});this.element.addEventListener("mousemove",this._mouseMoveListener=function(e){if(!_this33.enabled){return;}_this33._getMouseCanvasPos(e);tickifedMouseMoveFn();if(_this33.mouseover){e.preventDefault();}});var tickifiedMouseWheelFn=this.scene.tickify(function(delta){_this33.fire("mousewheel",delta,true);});this.element.addEventListener("wheel",this._mouseWheelListener=function(e,d){if(!_this33.enabled){return;}var delta=Math.max(-1,Math.min(1,-e.deltaY*40));tickifiedMouseWheelFn(delta);},{passive:true});// mouseclicked
|
|
5435
5442
|
{var downX;var downY;// Tolerance between down and up positions for a mouse click
|
|
5436
|
-
var tolerance=2;this.on("mousedown",function(params){downX=params[0];downY=params[1];});this.on("mouseup",function(params){if(downX>=params[0]-tolerance&&downX<=params[0]+tolerance&&downY>=params[1]-tolerance&&downY<=params[1]+tolerance){_this33.fire("mouseclicked",params,true);}});}this._eventsBound=true;}},{key:"_unbindEvents",value:function _unbindEvents(){if(!this._eventsBound){return;}this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener);this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener);this.element.removeEventListener("mouseenter",this._mouseEnterListener);this.element.removeEventListener("mouseleave",this._mouseLeaveListener);this.element.removeEventListener("mousedown",this._mouseDownListener);document.removeEventListener("mouseup",this._mouseDownListener);document.removeEventListener("click",this._clickListener);document.removeEventListener("dblclick",this._dblClickListener);this.element.removeEventListener("mousemove",this._mouseMoveListener);this.element.removeEventListener("wheel",this._mouseWheelListener);if(window.OrientationChangeEvent){window.removeEventListener(
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5443
|
+
var tolerance=2;this.on("mousedown",function(params){downX=params[0];downY=params[1];});this.on("mouseup",function(params){if(downX>=params[0]-tolerance&&downX<=params[0]+tolerance&&downY>=params[1]-tolerance&&downY<=params[1]+tolerance){_this33.fire("mouseclicked",params,true);}});}this._eventsBound=true;}},{key:"_unbindEvents",value:function _unbindEvents(){if(!this._eventsBound){return;}this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener);this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener);this.element.removeEventListener("mouseenter",this._mouseEnterListener);this.element.removeEventListener("mouseleave",this._mouseLeaveListener);this.element.removeEventListener("mousedown",this._mouseDownListener);document.removeEventListener("mouseup",this._mouseDownListener);document.removeEventListener("click",this._clickListener);document.removeEventListener("dblclick",this._dblClickListener);this.element.removeEventListener("mousemove",this._mouseMoveListener);this.element.removeEventListener("wheel",this._mouseWheelListener);if(window.OrientationChangeEvent){window.removeEventListener("orientationchange",this._orientationchangedListener);}if(window.DeviceMotionEvent){window.removeEventListener("devicemotion",this._deviceMotionListener);}if(window.DeviceOrientationEvent){window.removeEventListener("deviceorientation",this._deviceOrientListener);}this._eventsBound=false;}},{key:"_getMouseCanvasPos",value:function _getMouseCanvasPos(event){if(!event){event=window.event;this.mouseCanvasPos[0]=event.x;this.mouseCanvasPos[1]=event.y;}else{var element=event.target;var totalOffsetLeft=0;var totalOffsetTop=0;while(element.offsetParent){totalOffsetLeft+=element.offsetLeft;totalOffsetTop+=element.offsetTop;element=element.offsetParent;}this.mouseCanvasPos[0]=event.pageX-totalOffsetLeft;this.mouseCanvasPos[1]=event.pageY-totalOffsetTop;}}/**
|
|
5444
|
+
* Sets whether input handlers are enabled.
|
|
5445
|
+
*
|
|
5446
|
+
* Default value is ````true````.
|
|
5447
|
+
*
|
|
5448
|
+
* @param {Boolean} enable Indicates if input handlers are enabled.
|
|
5449
|
+
*/},{key:"setEnabled",value:function setEnabled(enable){if(this.enabled!==enable){this.fire("enabled",this.enabled=enable);}}/**
|
|
5450
|
+
* Gets whether input handlers are enabled.
|
|
5451
|
+
*
|
|
5452
|
+
* Default value is ````true````.
|
|
5453
|
+
*
|
|
5454
|
+
* @returns {Boolean} Indicates if input handlers are enabled.
|
|
5455
|
+
*/},{key:"getEnabled",value:function getEnabled(){return this.enabled;}/**
|
|
5456
|
+
* Sets whether or not keyboard input is enabled.
|
|
5457
|
+
*
|
|
5458
|
+
* Default value is ````true````.
|
|
5459
|
+
*
|
|
5460
|
+
* {@link CameraControl} will not respond to keyboard events while this is set ````false````.
|
|
5461
|
+
*
|
|
5462
|
+
* @param {Boolean} value Indicates whether keyboard input is enabled.
|
|
5463
|
+
*/},{key:"setKeyboardEnabled",value:function setKeyboardEnabled(value){this.keyboardEnabled=value;}/**
|
|
5464
|
+
* Gets whether keyboard input is enabled.
|
|
5465
|
+
*
|
|
5466
|
+
* Default value is ````true````.
|
|
5467
|
+
*
|
|
5468
|
+
* {@link CameraControl} will not respond to keyboard events while this is set ````false````.
|
|
5469
|
+
*
|
|
5470
|
+
* @returns {Boolean} Returns whether keyboard input is enabled.
|
|
5471
|
+
*/},{key:"getKeyboardEnabled",value:function getKeyboardEnabled(){return this.keyboardEnabled;}/**
|
|
5472
|
+
* @private
|
|
5473
|
+
*/},{key:"destroy",value:function destroy(){_get(_getPrototypeOf(Input.prototype),"destroy",this).call(this);this._unbindEvents();}}]);return Input;}(Component);var ids$3=new Map$1({});/**
|
|
5467
5474
|
* @desc Represents a chunk of state changes applied by the {@link Scene}'s renderer while it renders a frame.
|
|
5468
5475
|
*
|
|
5469
5476
|
* * Contains properties that represent the state changes.
|
|
@@ -18957,17 +18964,27 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
18957
18964
|
* @param [cfg] Configuration
|
|
18958
18965
|
* @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
|
|
18959
18966
|
* @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
|
|
18960
|
-
|
|
18967
|
+
* @param {_offsetX} [cfg._offsetX] _offsetX of the mouse
|
|
18968
|
+
* @param {_offsetY} [cfg._offsetY] _offsetY of the mouse
|
|
18969
|
+
*/function DistanceMeasurementsMouseControl(distanceMeasurementsPlugin){var _this81;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DistanceMeasurementsMouseControl);_this81=_super117.call(this,distanceMeasurementsPlugin.viewer.scene);_this81.pointerLens=cfg.pointerLens;_this81._active=false;_this81._currentDistanceMeasurement=null;_this81._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null};_this81._initMarkerDiv();_this81._onCameraControlHoverSnapOrSurface=null;_this81._onCameraControlHoverSnapOrSurfaceOff=null;_this81._onMouseDown=null;_this81._onMouseUp=null;_this81._onCanvasTouchStart=null;_this81._onCanvasTouchEnd=null;_this81._snapping=cfg.snapping!==false;_this81._mouseState=MOUSE_FIRST_CLICK_EXPECTED;_this81._attachPlugin(distanceMeasurementsPlugin,cfg);_this81._offsetX=cfg._offsetX|0;_this81._offsetY=cfg._offsetY|0;return _this81;}_createClass(DistanceMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement("div");markerDiv.setAttribute("id","myDistanceMarker");var canvas=this.scene.canvas.canvas;canvas.parentNode.insertBefore(markerDiv,canvas);markerDiv.style.background="black";markerDiv.style.border="2px solid blue";markerDiv.style.borderRadius="10px";markerDiv.style.width="5px";markerDiv.style.height="5px";markerDiv.style.margin="-200px -200px";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this._markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this._markerDiv){var element=document.getElementById("myDistanceMarker");element.parentNode.removeChild(element);this._markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(distanceMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
|
|
18961
18970
|
* The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurementsMouseControl.
|
|
18962
18971
|
* @type {DistanceMeasurementsPlugin}
|
|
18963
18972
|
*/this.distanceMeasurementsPlugin=distanceMeasurementsPlugin;/**
|
|
18964
18973
|
* The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurementsMouseControl.
|
|
18965
18974
|
* @type {DistanceMeasurementsPlugin}
|
|
18966
18975
|
*/this.plugin=distanceMeasurementsPlugin;}/**
|
|
18976
|
+
* @param {number} offsetX
|
|
18977
|
+
*/},{key:"offsetX",get:/**
|
|
18978
|
+
* @return {number} mouse offset
|
|
18979
|
+
*/function get(){return this._offsetX;}/**
|
|
18980
|
+
* @param {number} offsetX
|
|
18981
|
+
*/,set:function set(offsetX){this._offsetX=offsetX;}},{key:"offsetY",get:/**
|
|
18982
|
+
* @return {number} mouse offset
|
|
18983
|
+
*/function get(){return this._offsetY;}/**
|
|
18967
18984
|
* Gets if this DistanceMeasurementsMouseControl is currently active, where it is responding to input.
|
|
18968
18985
|
*
|
|
18969
18986
|
* @returns {boolean} True if this DistanceMeasurementsMouseControl is active.
|
|
18970
|
-
|
|
18987
|
+
*/,set:function set(offsetY){this._offsetY=offsetY;}},{key:"active",get:function get(){return this._active;}/**
|
|
18971
18988
|
* Sets whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
|
|
18972
18989
|
*
|
|
18973
18990
|
* This is `true` by default.
|
|
@@ -18985,7 +19002,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
18985
19002
|
* @returns {boolean} Whether snap-to-vertex and snap-to-edge are enabled for this DistanceMeasurementsMouseControl.
|
|
18986
19003
|
*/function get(){return this._snapping;}/**
|
|
18987
19004
|
* Activates this DistanceMeasurementsMouseControl, ready to respond to input.
|
|
18988
|
-
*/,set:function set(snapping){if(snapping!==this._snapping){this._snapping=snapping;this.deactivate();this.activate();}else{this._snapping=snapping;}}},{key:"activate",value:function activate(){var _this82=this;if(this._active){return;}if(!this._markerDiv){this._initMarkerDiv();}this.fire("activated",true);var distanceMeasurementsPlugin=this.distanceMeasurementsPlugin;var scene=this.scene;var cameraControl=distanceMeasurementsPlugin.viewer.cameraControl;var canvas=scene.canvas.canvas;scene.input;var mouseHovering=false;var pointerWorldPos=math.vec3();var pointerCanvasPos=math.vec2();var pointerDownCanvasX;var pointerDownCanvasY;var clickTolerance=20;var hoveredEntity=null;this._mouseState=MOUSE_FIRST_CLICK_EXPECTED;this._onCameraControlHoverSnapOrSurface=cameraControl.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",function(event){var canvasPos=event.snappedCanvasPos||event.canvasPos;mouseHovering=true;pointerWorldPos.set(event.worldPos);pointerCanvasPos.set(event.canvasPos);if(_this82._mouseState===MOUSE_FIRST_CLICK_EXPECTED){canvas.getBoundingClientRect();var scrollLeft=window.pageXOffset||document.documentElement.scrollLeft;var scrollTop=window.pageYOffset||document.documentElement.scrollTop;var canvasLeftEdge=scrollLeft;var canvasTopEdge=scrollTop;_this82._markerDiv.style.marginLeft="".concat(canvasLeftEdge+canvasPos[0]-5,"px");_this82._markerDiv.style.marginTop="".concat(canvasTopEdge+canvasPos[1]-5,"px");_this82._markerDiv.style.background="pink";if(event.snappedToVertex||event.snappedToEdge){if(_this82.pointerLens){_this82.pointerLens.visible=true;_this82.pointerLens.canvasPos=event.canvasPos;_this82.pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;_this82.pointerLens.snapped=true;}_this82._markerDiv.style.background="greenyellow";_this82._markerDiv.style.border="2px solid green";}else{if(_this82.pointerLens){_this82.pointerLens.visible=true;_this82.pointerLens.canvasPos=event.canvasPos;_this82.pointerLens.snappedCanvasPos=event.canvasPos;_this82.pointerLens.snapped=false;}_this82._markerDiv.style.background="pink";_this82._markerDiv.style.border="2px solid red";}hoveredEntity=event.entity;}else{_this82._markerDiv.style.marginLeft="-10000px";_this82._markerDiv.style.marginTop="-10000px";}canvas.style.cursor="pointer";if(_this82._currentDistanceMeasurement){_this82._currentDistanceMeasurement.wireVisible=_this82._currentDistanceMeasurementInitState.wireVisible;_this82._currentDistanceMeasurement.axisVisible=_this82._currentDistanceMeasurementInitState.axisVisible&&_this82.distanceMeasurementsPlugin.defaultAxisVisible;_this82._currentDistanceMeasurement.xAxisVisible=_this82._currentDistanceMeasurementInitState.xAxisVisible&&_this82.distanceMeasurementsPlugin.defaultXAxisVisible;_this82._currentDistanceMeasurement.yAxisVisible=_this82._currentDistanceMeasurementInitState.yAxisVisible&&_this82.distanceMeasurementsPlugin.defaultYAxisVisible;_this82._currentDistanceMeasurement.zAxisVisible=_this82._currentDistanceMeasurementInitState.zAxisVisible&&_this82.distanceMeasurementsPlugin.defaultZAxisVisible;_this82._currentDistanceMeasurement.targetVisible=_this82._currentDistanceMeasurementInitState.targetVisible;_this82._currentDistanceMeasurement.target.worldPos=pointerWorldPos.slice();_this82._markerDiv.style.marginLeft="-10000px";_this82._markerDiv.style.marginTop="-10000px";}});canvas.addEventListener("mousedown",this._onMouseDown=function(e){if(e.which!==1){return;}pointerDownCanvasX=e.clientX;pointerDownCanvasY=e.clientY;});canvas.addEventListener("mouseup",this._onMouseUp=function(e){if(e.which!==1){return;}if(e.clientX>pointerDownCanvasX+clickTolerance||e.clientX<pointerDownCanvasX-clickTolerance||e.clientY>pointerDownCanvasY+clickTolerance||e.clientY<pointerDownCanvasY-clickTolerance){return;}if(_this82._currentDistanceMeasurement){if(mouseHovering){_this82._currentDistanceMeasurement.target.entity=hoveredEntity;hoveredEntity=null;_this82._currentDistanceMeasurement.clickable=true;_this82.distanceMeasurementsPlugin.fire("measurementEnd",_this82._currentDistanceMeasurement);_this82._currentDistanceMeasurement=null;}else{_this82._currentDistanceMeasurement.destroy();_this82.distanceMeasurementsPlugin.fire("measurementCancel",_this82._currentDistanceMeasurement);_this82._currentDistanceMeasurement=null;hoveredEntity=null;}}else{if(mouseHovering){_this82._currentDistanceMeasurement=distanceMeasurementsPlugin.createMeasurement({id:math.createUUID(),origin:{worldPos:pointerWorldPos.slice()},target:{worldPos:pointerWorldPos.slice()},approximate:true});_this82._currentDistanceMeasurementInitState.axisVisible=_this82._currentDistanceMeasurement.axisVisible&&_this82.distanceMeasurementsPlugin.defaultAxisVisible;_this82._currentDistanceMeasurementInitState.xAxisVisible=_this82._currentDistanceMeasurement.xAxisVisible&&_this82.distanceMeasurementsPlugin.defaultXAxisVisible;_this82._currentDistanceMeasurementInitState.yAxisVisible=_this82._currentDistanceMeasurement.yAxisVisible&&_this82.distanceMeasurementsPlugin.defaultYAxisVisible;_this82._currentDistanceMeasurementInitState.zAxisVisible=_this82._currentDistanceMeasurement.zAxisVisible&&_this82.distanceMeasurementsPlugin.defaultZAxisVisible;_this82._currentDistanceMeasurementInitState.wireVisible=_this82._currentDistanceMeasurement.wireVisible;_this82._currentDistanceMeasurementInitState.targetVisible=_this82._currentDistanceMeasurement.targetVisible;_this82._currentDistanceMeasurement.clickable=false;_this82._currentDistanceMeasurement.origin.entity=hoveredEntity;hoveredEntity=null;_this82.fire("measurementStart",_this82._currentDistanceMeasurement);}}});this._onCameraControlHoverSnapOrSurfaceOff=cameraControl.on(this._snapping?"hoverSnapOrSurfaceOff":"hoverOff",function(event){if(_this82.pointerLens){_this82.pointerLens.visible=true;_this82.pointerLens.canvasPos=event.canvasPos;_this82.pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;}mouseHovering=false;_this82._markerDiv.style.marginLeft="-100px";_this82._markerDiv.style.marginTop="-100px";if(_this82._currentDistanceMeasurement){_this82._currentDistanceMeasurement.wireVisible=false;_this82._currentDistanceMeasurement.targetVisible=false;_this82._currentDistanceMeasurement.axisVisible=false;}canvas.style.cursor="default";});this._active=true;}/**
|
|
19005
|
+
*/,set:function set(snapping){if(snapping!==this._snapping){this._snapping=snapping;this.deactivate();this.activate();}else{this._snapping=snapping;}}},{key:"activate",value:function activate(){var _this82=this;if(this._active){return;}if(!this._markerDiv){this._initMarkerDiv();}this.fire("activated",true);var distanceMeasurementsPlugin=this.distanceMeasurementsPlugin;var scene=this.scene;var cameraControl=distanceMeasurementsPlugin.viewer.cameraControl;var canvas=scene.canvas.canvas;scene.input;var mouseHovering=false;var pointerWorldPos=math.vec3();var pointerCanvasPos=math.vec2();var pointerDownCanvasX;var pointerDownCanvasY;var clickTolerance=20;var hoveredEntity=null;this._mouseState=MOUSE_FIRST_CLICK_EXPECTED;this._onCameraControlHoverSnapOrSurface=cameraControl.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",function(event){var canvasPos=event.snappedCanvasPos||event.canvasPos;mouseHovering=true;pointerWorldPos.set(event.worldPos);pointerCanvasPos.set(event.canvasPos);if(_this82._mouseState===MOUSE_FIRST_CLICK_EXPECTED){canvas.getBoundingClientRect();var scrollLeft=window.pageXOffset||document.documentElement.scrollLeft;var scrollTop=window.pageYOffset||document.documentElement.scrollTop;var canvasLeftEdge=scrollLeft;var canvasTopEdge=scrollTop;_this82._markerDiv.style.marginLeft="".concat(_this82._offsetX+canvasLeftEdge+canvasPos[0]-5,"px");_this82._markerDiv.style.marginTop="".concat(_this82._offsetY+canvasTopEdge+canvasPos[1]-5,"px");_this82._markerDiv.style.background="pink";if(event.snappedToVertex||event.snappedToEdge){if(_this82.pointerLens){_this82.pointerLens.visible=true;_this82.pointerLens.canvasPos=event.canvasPos;_this82.pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;_this82.pointerLens.snapped=true;}_this82._markerDiv.style.background="greenyellow";_this82._markerDiv.style.border="2px solid green";}else{if(_this82.pointerLens){_this82.pointerLens.visible=true;_this82.pointerLens.canvasPos=event.canvasPos;_this82.pointerLens.snappedCanvasPos=event.canvasPos;_this82.pointerLens.snapped=false;}_this82._markerDiv.style.background="pink";_this82._markerDiv.style.border="2px solid red";}hoveredEntity=event.entity;}else{_this82._markerDiv.style.marginLeft="-10000px";_this82._markerDiv.style.marginTop="-10000px";}canvas.style.cursor="pointer";if(_this82._currentDistanceMeasurement){_this82._currentDistanceMeasurement.wireVisible=_this82._currentDistanceMeasurementInitState.wireVisible;_this82._currentDistanceMeasurement.axisVisible=_this82._currentDistanceMeasurementInitState.axisVisible&&_this82.distanceMeasurementsPlugin.defaultAxisVisible;_this82._currentDistanceMeasurement.xAxisVisible=_this82._currentDistanceMeasurementInitState.xAxisVisible&&_this82.distanceMeasurementsPlugin.defaultXAxisVisible;_this82._currentDistanceMeasurement.yAxisVisible=_this82._currentDistanceMeasurementInitState.yAxisVisible&&_this82.distanceMeasurementsPlugin.defaultYAxisVisible;_this82._currentDistanceMeasurement.zAxisVisible=_this82._currentDistanceMeasurementInitState.zAxisVisible&&_this82.distanceMeasurementsPlugin.defaultZAxisVisible;_this82._currentDistanceMeasurement.targetVisible=_this82._currentDistanceMeasurementInitState.targetVisible;_this82._currentDistanceMeasurement.target.worldPos=pointerWorldPos.slice();_this82._markerDiv.style.marginLeft="-10000px";_this82._markerDiv.style.marginTop="-10000px";}});canvas.addEventListener("mousedown",this._onMouseDown=function(e){if(e.which!==1){return;}pointerDownCanvasX=e.clientX;pointerDownCanvasY=e.clientY;});canvas.addEventListener("mouseup",this._onMouseUp=function(e){if(e.which!==1){return;}if(e.clientX>pointerDownCanvasX+clickTolerance||e.clientX<pointerDownCanvasX-clickTolerance||e.clientY>pointerDownCanvasY+clickTolerance||e.clientY<pointerDownCanvasY-clickTolerance){return;}if(_this82._currentDistanceMeasurement){if(mouseHovering){_this82._currentDistanceMeasurement.target.entity=hoveredEntity;hoveredEntity=null;_this82._currentDistanceMeasurement.clickable=true;_this82.distanceMeasurementsPlugin.fire("measurementEnd",_this82._currentDistanceMeasurement);_this82._currentDistanceMeasurement=null;}else{_this82._currentDistanceMeasurement.destroy();_this82.distanceMeasurementsPlugin.fire("measurementCancel",_this82._currentDistanceMeasurement);_this82._currentDistanceMeasurement=null;hoveredEntity=null;}}else{if(mouseHovering){_this82._currentDistanceMeasurement=distanceMeasurementsPlugin.createMeasurement({id:math.createUUID(),origin:{worldPos:pointerWorldPos.slice()},target:{worldPos:pointerWorldPos.slice()},approximate:true});_this82._currentDistanceMeasurementInitState.axisVisible=_this82._currentDistanceMeasurement.axisVisible&&_this82.distanceMeasurementsPlugin.defaultAxisVisible;_this82._currentDistanceMeasurementInitState.xAxisVisible=_this82._currentDistanceMeasurement.xAxisVisible&&_this82.distanceMeasurementsPlugin.defaultXAxisVisible;_this82._currentDistanceMeasurementInitState.yAxisVisible=_this82._currentDistanceMeasurement.yAxisVisible&&_this82.distanceMeasurementsPlugin.defaultYAxisVisible;_this82._currentDistanceMeasurementInitState.zAxisVisible=_this82._currentDistanceMeasurement.zAxisVisible&&_this82.distanceMeasurementsPlugin.defaultZAxisVisible;_this82._currentDistanceMeasurementInitState.wireVisible=_this82._currentDistanceMeasurement.wireVisible;_this82._currentDistanceMeasurementInitState.targetVisible=_this82._currentDistanceMeasurement.targetVisible;_this82._currentDistanceMeasurement.clickable=false;_this82._currentDistanceMeasurement.origin.entity=hoveredEntity;hoveredEntity=null;_this82.fire("measurementStart",_this82._currentDistanceMeasurement);}}});this._onCameraControlHoverSnapOrSurfaceOff=cameraControl.on(this._snapping?"hoverSnapOrSurfaceOff":"hoverOff",function(event){if(_this82.pointerLens){_this82.pointerLens.visible=true;_this82.pointerLens.canvasPos=event.canvasPos;_this82.pointerLens.snappedCanvasPos=event.snappedCanvasPos||event.canvasPos;}mouseHovering=false;_this82._markerDiv.style.marginLeft="-100px";_this82._markerDiv.style.marginTop="-100px";if(_this82._currentDistanceMeasurement){_this82._currentDistanceMeasurement.wireVisible=false;_this82._currentDistanceMeasurement.targetVisible=false;_this82._currentDistanceMeasurement.axisVisible=false;}canvas.style.cursor="default";});this._active=true;}/**
|
|
18989
19006
|
* Deactivates this DistanceMeasurementsMouseControl, making it unresponsive to input.
|
|
18990
19007
|
*
|
|
18991
19008
|
* Destroys any {@link DistanceMeasurement} under construction by this DistanceMeasurementsMouseControl.
|