From 3fedd72e403e03996789777574ca27350640aaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20Marti=CC=81?= Date: Fri, 17 Nov 2023 09:46:30 +0100 Subject: [PATCH] Fire `"activated"` events from `DistanceMeasurementsMouseControl` --- .../DistanceMeasurementsMouseControl.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.js b/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.js index 6b32199ecf..34b34b3424 100644 --- a/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.js +++ b/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.js @@ -161,6 +161,8 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro return; } + this.fire("activated", true); + const distanceMeasurementsPlugin = this.distanceMeasurementsPlugin; const scene = this.scene; const cameraControl = distanceMeasurementsPlugin.viewer.cameraControl; @@ -307,6 +309,9 @@ export class DistanceMeasurementsMouseControl extends DistanceMeasurementsContro if (!this._active) { return; } + + this.fire("activated", false); + if (this.pointerLens) { this.pointerLens.visible = false; }