Skip to content

Commit

Permalink
Merge pull request #1380 from xeokit/fix-angle-measurements
Browse files Browse the repository at this point in the history
Fix undefined _markerDiv bug in AngleMeasurementsMouseControl
  • Loading branch information
xeolabs authored Feb 25, 2024
2 parents 6559a30 + 5b3b60f commit 9670349
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
const canvasLeftEdge = canvasBoundRect.left + scrollLeft;
const canvasTopEdge = canvasBoundRect.top + scrollTop;
this._markerDiv.style.marginLeft = `${canvasLeftEdge + canvasPos[0] - 5}px`;
this._markerDiv.style.marginTop = `${canvasTopEdge + canvasPos[1] - 5}px`;
this.markerDiv.style.marginLeft = `${canvasLeftEdge + canvasPos[0] - 5}px`;
this.markerDiv.style.marginTop = `${canvasTopEdge + canvasPos[1] - 5}px`;
break;
case MOUSE_FINDING_CORNER:
if (this._currentAngleMeasurement) {
Expand Down Expand Up @@ -387,7 +387,7 @@ export class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
if (this.pointerLens) {
this.pointerLens.visible = false;
}
if (this._markerDiv) {
if (this.markerDiv) {
this._destroyMarkerDiv()
}
this.reset();
Expand Down

0 comments on commit 9670349

Please sign in to comment.