Skip to content

Commit

Permalink
Merge pull request #1490 from xeokit/cancellable-measurements
Browse files Browse the repository at this point in the history
Cancellable measurements
  • Loading branch information
xeolabs authored May 15, 2024
2 parents 0f4fb29 + f5931e2 commit 9342247
Show file tree
Hide file tree
Showing 62 changed files with 35,503 additions and 29,518 deletions.
57 changes: 57 additions & 0 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12130,6 +12130,15 @@ class AngleMeasurementsControl extends Component {
reset() {
}

/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsControl, if any.
*
* @returns {null|AngleMeasurement}
*/
get currentMeasurement() {
return null;
}

/**
* Destroys this AngleMeasurementsMouseControl.
*
Expand Down Expand Up @@ -12580,6 +12589,15 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
this._mouseState = MOUSE_FINDING_ORIGIN;
}

/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl, if any.
*
* @returns {null|AngleMeasurement}
*/
get currentMeasurement() {
return this._currentAngleMeasurement;
}

/**
* Destroys this AngleMeasurementsMouseControl.
*/
Expand Down Expand Up @@ -13933,6 +13951,15 @@ class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
}
}

/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsTouchControl, if any.
*
* @returns {null|AngleMeasurement}
*/
get currentMeasurement() {
return this._currentAngleMeasurement;
}

/**
* Destroys this AngleMeasurementsTouchControl.
*/
Expand Down Expand Up @@ -87189,6 +87216,15 @@ class DistanceMeasurementsControl extends Component {
reset() {
}

/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsControl, if any.
*
* @returns {null|DistanceMeasurement}
*/
get currentMeasurement() {
return null;
}

/**
* Destroys this DistanceMeasurementsControl.
*
Expand Down Expand Up @@ -87595,6 +87631,17 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
this._currentDistanceMeasurement.destroy();
this._currentDistanceMeasurement = null;
}

this._mouseState = MOUSE_FIRST_CLICK_EXPECTED;
}

/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsMouseControl, if any.
*
* @returns {null|DistanceMeasurement}
*/
get currentMeasurement() {
return this._currentDistanceMeasurement;
}

/**
Expand Down Expand Up @@ -88894,6 +88941,16 @@ class DistanceMeasurementsTouchControl extends DistanceMeasurementsControl {
this._currentDistanceMeasurement.destroy();
this._currentDistanceMeasurement = null;
}
this._mouseState = WAITING_FOR_ORIGIN_TOUCH_START;
}

/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsTouchControl, if any.
*
* @returns {null|DistanceMeasurement}
*/
get currentMeasurement() {
return this._currentDistanceMeasurement;
}

/**
Expand Down
57 changes: 57 additions & 0 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -12126,6 +12126,15 @@ class AngleMeasurementsControl extends Component {
reset() {
}

/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsControl, if any.
*
* @returns {null|AngleMeasurement}
*/
get currentMeasurement() {
return null;
}

/**
* Destroys this AngleMeasurementsMouseControl.
*
Expand Down Expand Up @@ -12576,6 +12585,15 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
this._mouseState = MOUSE_FINDING_ORIGIN;
}

/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl, if any.
*
* @returns {null|AngleMeasurement}
*/
get currentMeasurement() {
return this._currentAngleMeasurement;
}

/**
* Destroys this AngleMeasurementsMouseControl.
*/
Expand Down Expand Up @@ -13929,6 +13947,15 @@ class AngleMeasurementsTouchControl extends AngleMeasurementsControl {
}
}

/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsTouchControl, if any.
*
* @returns {null|AngleMeasurement}
*/
get currentMeasurement() {
return this._currentAngleMeasurement;
}

/**
* Destroys this AngleMeasurementsTouchControl.
*/
Expand Down Expand Up @@ -87185,6 +87212,15 @@ class DistanceMeasurementsControl extends Component {
reset() {
}

/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsControl, if any.
*
* @returns {null|DistanceMeasurement}
*/
get currentMeasurement() {
return null;
}

/**
* Destroys this DistanceMeasurementsControl.
*
Expand Down Expand Up @@ -87591,6 +87627,17 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
this._currentDistanceMeasurement.destroy();
this._currentDistanceMeasurement = null;
}

this._mouseState = MOUSE_FIRST_CLICK_EXPECTED;
}

/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsMouseControl, if any.
*
* @returns {null|DistanceMeasurement}
*/
get currentMeasurement() {
return this._currentDistanceMeasurement;
}

/**
Expand Down Expand Up @@ -88890,6 +88937,16 @@ class DistanceMeasurementsTouchControl extends DistanceMeasurementsControl {
this._currentDistanceMeasurement.destroy();
this._currentDistanceMeasurement = null;
}
this._mouseState = WAITING_FOR_ORIGIN_TOUCH_START;
}

/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsTouchControl, if any.
*
* @returns {null|DistanceMeasurement}
*/
get currentMeasurement() {
return this._currentDistanceMeasurement;
}

/**
Expand Down
28 changes: 26 additions & 2 deletions dist/xeokit-sdk.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2933,6 +2933,10 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._cornerDot.s
*
* @abstract
*/},{key:"reset",value:function reset(){}/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsControl, if any.
*
* @returns {null|AngleMeasurement}
*/},{key:"currentMeasurement",get:function get(){return null;}/**
* Destroys this AngleMeasurementsMouseControl.
*
* Destroys any {@link AngleMeasurement} under construction by this AngleMeasurementsControl.
Expand Down Expand Up @@ -3024,6 +3028,10 @@ _this19._initMarkerDiv();_this19._onMouseHoverSurface=null;_this19._onHoverNothi
*
* Does nothing if the AngleMeasurementsMouseControl is not active.
*/},{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;}/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsMouseControl, if any.
*
* @returns {null|AngleMeasurement}
*/},{key:"currentMeasurement",get:function get(){return this._currentAngleMeasurement;}/**
* Destroys this AngleMeasurementsMouseControl.
*/},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(AngleMeasurementsMouseControl.prototype),"destroy",this).call(this);}}]);return AngleMeasurementsMouseControl;}(AngleMeasurementsControl);/**
* {@link Viewer} plugin for measuring angles.
Expand Down Expand Up @@ -3402,6 +3410,10 @@ enableCameraNavigation();break;case WAITING_FOR_TARGET_QUICK_TOUCH_END$1:{if(num
*
* Does nothing if the AngleMeasurementsTouchControl is not active.
*/},{key:"reset",value:function reset(){if(!this._active){return;}if(this._currentAngleMeasurement){this.angleMeasurementsPlugin.fire("measurementCancel",this._currentAngleMeasurement);this._currentAngleMeasurement.destroy();this._currentAngleMeasurement=null;}}/**
* Gets the {@link AngleMeasurement} under construction by this AngleMeasurementsTouchControl, if any.
*
* @returns {null|AngleMeasurement}
*/},{key:"currentMeasurement",get:function get(){return this._currentAngleMeasurement;}/**
* Destroys this AngleMeasurementsTouchControl.
*/},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(AngleMeasurementsTouchControl.prototype),"destroy",this).call(this);}}]);return AngleMeasurementsTouchControl;}(AngleMeasurementsControl);/**
* A {@link Marker} with an HTML label attached to it, managed by an {@link AnnotationsPlugin}.
Expand Down Expand Up @@ -19476,6 +19488,10 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
*
* @abstract
*/},{key:"reset",value:function reset(){}/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsControl, if any.
*
* @returns {null|DistanceMeasurement}
*/},{key:"currentMeasurement",get:function get(){return null;}/**
* Destroys this DistanceMeasurementsControl.
*
* Destroys any {@link DistanceMeasurement} under construction by this DistanceMeasurementsControl.
Expand Down Expand Up @@ -19561,7 +19577,11 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
* Destroys any {@link DistanceMeasurement} under construction by this DistanceMeasurementsMouseControl.
*
* Does nothing if the DistanceMeasurementsMouseControl is not active.
*/},{key:"reset",value:function reset(){if(!this._active){return;}this._destroyMarkerDiv();this._initMarkerDiv();if(this._currentDistanceMeasurement){this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement);this._currentDistanceMeasurement.destroy();this._currentDistanceMeasurement=null;}}/**
*/},{key:"reset",value:function reset(){if(!this._active){return;}this._destroyMarkerDiv();this._initMarkerDiv();if(this._currentDistanceMeasurement){this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement);this._currentDistanceMeasurement.destroy();this._currentDistanceMeasurement=null;}this._mouseState=MOUSE_FIRST_CLICK_EXPECTED;}/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsMouseControl, if any.
*
* @returns {null|DistanceMeasurement}
*/},{key:"currentMeasurement",get:function get(){return this._currentDistanceMeasurement;}/**
* Destroys this DistanceMeasurementsMouseControl.
*
* Destroys any {@link DistanceMeasurement} under construction by this DistanceMeasurementsMouseControl.
Expand Down Expand Up @@ -19994,7 +20014,11 @@ return;}if(_this90.pointerLens){_this90.pointerLens.canvasPos=touchMoveCanvasPos
* Destroys any {@link DistanceMeasurement} under construction.
*
* Does nothing if the DistanceMeasurementsTouchControl is not active.
*/},{key:"reset",value:function reset(){if(!this._active){return;}if(this._currentDistanceMeasurement){this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement);this._currentDistanceMeasurement.destroy();this._currentDistanceMeasurement=null;}}/**
*/},{key:"reset",value:function reset(){if(!this._active){return;}if(this._currentDistanceMeasurement){this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement);this._currentDistanceMeasurement.destroy();this._currentDistanceMeasurement=null;}this._mouseState=WAITING_FOR_ORIGIN_TOUCH_START;}/**
* Gets the {@link DistanceMeasurement} under construction by this DistanceMeasurementsTouchControl, if any.
*
* @returns {null|DistanceMeasurement}
*/},{key:"currentMeasurement",get:function get(){return this._currentDistanceMeasurement;}/**
* Destroys this DistanceMeasurementsTouchControl.
*/},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(DistanceMeasurementsTouchControl.prototype),"destroy",this).call(this);}}]);return DistanceMeasurementsTouchControl;}(DistanceMeasurementsControl);/**
* {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching
Expand Down
6 changes: 3 additions & 3 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.

Loading

0 comments on commit 9342247

Please sign in to comment.