From e2f5df62087d094b76c6387a9a35461f954e4ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 10 Apr 2024 21:27:11 +0200 Subject: [PATCH] annotation tool: Fix `viewer` not being in scope. Like the other functions do. It only works on the examples because they put `viewer` into the `window` scope. --- src/utils/AnnotationTool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/AnnotationTool.js b/src/utils/AnnotationTool.js index 25fa9687..503751bc 100644 --- a/src/utils/AnnotationTool.js +++ b/src/utils/AnnotationTool.js @@ -71,7 +71,7 @@ export class AnnotationTool extends EventDispatcher{ }; let drop = (e) => { - viewer.scene.scene.remove(this.s); + this.viewer.scene.scene.remove(this.s); this.s.removeEventListener("drag", drag); this.s.removeEventListener("drop", drop); };