Skip to content

Commit

Permalink
Merge pull request #1625 from xeokit/XEOK-93-fix-AngleMeasurementsMou…
Browse files Browse the repository at this point in the history
…seControl-dot

XEOK-93 Fix AngleMeasurementsMouseControl dot
  • Loading branch information
xeolabs committed Aug 13, 2024
2 parents e6a6249 + 683909b commit dc1c7c3
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 28 deletions.
8 changes: 2 additions & 6 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12692,7 +12692,6 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {

_initMarkerDiv() {
const markerDiv = document.createElement('div');
markerDiv.setAttribute('id', 'myMarkerDiv');
const canvas = this.scene.canvas.canvas;
canvas.parentNode.insertBefore(markerDiv, canvas);

Expand All @@ -12713,8 +12712,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {

_destroyMarkerDiv() {
if (this.markerDiv) {
const element = document.getElementById('myMarkerDiv');
element.parentNode.removeChild(element);
this.markerDiv.parentNode.removeChild(this.markerDiv);
this.markerDiv = null;
}
}
Expand Down Expand Up @@ -89154,7 +89152,6 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {

_initMarkerDiv() {
const markerDiv = document.createElement('div');
markerDiv.setAttribute('id', 'myMarkerDiv');
const canvas = this.scene.canvas.canvas;
canvas.parentNode.insertBefore(markerDiv, canvas);
markerDiv.style.background = "black";
Expand All @@ -89174,8 +89171,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {

_destroyMarkerDiv() {
if (this._markerDiv) {
const element = document.getElementById('myMarkerDiv');
element.parentNode.removeChild(element);
this._markerDiv.parentNode.removeChild(this._markerDiv);
this._markerDiv = null;
}
}
Expand Down
8 changes: 2 additions & 6 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -12688,7 +12688,6 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {

_initMarkerDiv() {
const markerDiv = document.createElement('div');
markerDiv.setAttribute('id', 'myMarkerDiv');
const canvas = this.scene.canvas.canvas;
canvas.parentNode.insertBefore(markerDiv, canvas);

Expand All @@ -12709,8 +12708,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {

_destroyMarkerDiv() {
if (this.markerDiv) {
const element = document.getElementById('myMarkerDiv');
element.parentNode.removeChild(element);
this.markerDiv.parentNode.removeChild(this.markerDiv);
this.markerDiv = null;
}
}
Expand Down Expand Up @@ -89150,7 +89148,6 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {

_initMarkerDiv() {
const markerDiv = document.createElement('div');
markerDiv.setAttribute('id', 'myMarkerDiv');
const canvas = this.scene.canvas.canvas;
canvas.parentNode.insertBefore(markerDiv, canvas);
markerDiv.style.background = "black";
Expand All @@ -89170,8 +89167,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {

_destroyMarkerDiv() {
if (this._markerDiv) {
const element = document.getElementById('myMarkerDiv');
element.parentNode.removeChild(element);
this._markerDiv.parentNode.removeChild(this._markerDiv);
this._markerDiv = null;
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/xeokit-sdk.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -3004,7 +3004,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._cornerDot.s
* @param {function} [cfg.canvasToPagePos] Optional function to map canvas-space coordinates to page coordinates.
* @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
* @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this AngleMeasurementsMouseControl.
*/function AngleMeasurementsMouseControl(angleMeasurementsPlugin){var _this20;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,AngleMeasurementsMouseControl);_this20=_super8.call(this,angleMeasurementsPlugin.viewer.scene);_this20._canvasToPagePos=cfg.canvasToPagePos;_this20.pointerLens=cfg.pointerLens;_this20._active=false;_this20._currentAngleMeasurement=null;_this20._initMarkerDiv();_this20._snapping=cfg.snapping!==false;_this20._mouseState=MOUSE_FINDING_ORIGIN;_this20._attachPlugin(angleMeasurementsPlugin,cfg);return _this20;}_createClass(AngleMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');markerDiv.setAttribute('id','myMarkerDiv');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.top="-200px";markerDiv.style.left="-200px";markerDiv.style.margin="0 0";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('myMarkerDiv');element.parentNode.removeChild(element);this.markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(angleMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
*/function AngleMeasurementsMouseControl(angleMeasurementsPlugin){var _this20;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,AngleMeasurementsMouseControl);_this20=_super8.call(this,angleMeasurementsPlugin.viewer.scene);_this20._canvasToPagePos=cfg.canvasToPagePos;_this20.pointerLens=cfg.pointerLens;_this20._active=false;_this20._currentAngleMeasurement=null;_this20._initMarkerDiv();_this20._snapping=cfg.snapping!==false;_this20._mouseState=MOUSE_FINDING_ORIGIN;_this20._attachPlugin(angleMeasurementsPlugin,cfg);return _this20;}_createClass(AngleMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');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.top="-200px";markerDiv.style.left="-200px";markerDiv.style.margin="0 0";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this.markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this.markerDiv){this.markerDiv.parentNode.removeChild(this.markerDiv);this.markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(angleMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
* The {@link AngleMeasurementsPlugin} that owns this AngleMeasurementsMouseControl.
*
* @type {AngleMeasurementsPlugin}
Expand Down Expand Up @@ -19941,7 +19941,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
* @param {function} [cfg.canvasToPagePos] Optional function to map canvas-space coordinates to page coordinates.
* @param {PointerLens} [cfg.pointerLens] A PointerLens to use to provide a magnified view of the cursor when snapping is enabled.
* @param {boolean} [cfg.snapping=true] Whether to initially enable snap-to-vertex and snap-to-edge for this DistanceMeasurementsMouseControl.
*/function DistanceMeasurementsMouseControl(distanceMeasurementsPlugin){var _this87;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DistanceMeasurementsMouseControl);_this87=_super123.call(this,distanceMeasurementsPlugin.viewer.scene);_this87._canvasToPagePos=cfg.canvasToPagePos;_this87.pointerLens=cfg.pointerLens;_this87._active=false;_this87._currentDistanceMeasurement=null;_this87._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null};_this87._initMarkerDiv();_this87._snapping=cfg.snapping!==false;_this87._mouseState=MOUSE_FIRST_CLICK_EXPECTED;_this87._attachPlugin(distanceMeasurementsPlugin,cfg);return _this87;}_createClass(DistanceMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');markerDiv.setAttribute('id','myMarkerDiv');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.top="-200px";markerDiv.style.left="-200px";markerDiv.style.margin="0 0";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('myMarkerDiv');element.parentNode.removeChild(element);this._markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(distanceMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
*/function DistanceMeasurementsMouseControl(distanceMeasurementsPlugin){var _this87;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,DistanceMeasurementsMouseControl);_this87=_super123.call(this,distanceMeasurementsPlugin.viewer.scene);_this87._canvasToPagePos=cfg.canvasToPagePos;_this87.pointerLens=cfg.pointerLens;_this87._active=false;_this87._currentDistanceMeasurement=null;_this87._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null};_this87._initMarkerDiv();_this87._snapping=cfg.snapping!==false;_this87._mouseState=MOUSE_FIRST_CLICK_EXPECTED;_this87._attachPlugin(distanceMeasurementsPlugin,cfg);return _this87;}_createClass(DistanceMeasurementsMouseControl,[{key:"_initMarkerDiv",value:function _initMarkerDiv(){var markerDiv=document.createElement('div');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.top="-200px";markerDiv.style.left="-200px";markerDiv.style.margin="0 0";markerDiv.style.zIndex="100";markerDiv.style.position="absolute";markerDiv.style.pointerEvents="none";this._markerDiv=markerDiv;}},{key:"_destroyMarkerDiv",value:function _destroyMarkerDiv(){if(this._markerDiv){this._markerDiv.parentNode.removeChild(this._markerDiv);this._markerDiv=null;}}},{key:"_attachPlugin",value:function _attachPlugin(distanceMeasurementsPlugin){var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};/**
* The {@link DistanceMeasurementsPlugin} that owns this DistanceMeasurementsMouseControl.
* @type {DistanceMeasurementsPlugin}
*/this.distanceMeasurementsPlugin=distanceMeasurementsPlugin;/**
Expand Down
4 changes: 2 additions & 2 deletions dist/xeokit-sdk.min.cjs.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/xeokit-sdk.min.es.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/xeokit-sdk.min.es5.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {

_initMarkerDiv() {
const markerDiv = document.createElement('div');
markerDiv.setAttribute('id', 'myMarkerDiv');
const canvas = this.scene.canvas.canvas;
canvas.parentNode.insertBefore(markerDiv, canvas);

Expand All @@ -95,9 +94,8 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {

_destroyMarkerDiv() {
if (this.markerDiv) {
const element = document.getElementById('myMarkerDiv')
element.parentNode.removeChild(element)
this.markerDiv = null
this.markerDiv.parentNode.removeChild(this.markerDiv);
this.markerDiv = null;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro

_initMarkerDiv() {
const markerDiv = document.createElement('div');
markerDiv.setAttribute('id', 'myMarkerDiv');
const canvas = this.scene.canvas.canvas;
canvas.parentNode.insertBefore(markerDiv, canvas);
markerDiv.style.background = "black";
Expand All @@ -102,9 +101,8 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro

_destroyMarkerDiv() {
if (this._markerDiv) {
const element = document.getElementById('myMarkerDiv')
element.parentNode.removeChild(element)
this._markerDiv = null
this._markerDiv.parentNode.removeChild(this._markerDiv);
this._markerDiv = null;
}
}

Expand Down

0 comments on commit dc1c7c3

Please sign in to comment.