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.
This commit is contained in:
Niklas Hambüchen 2024-04-10 21:27:11 +02:00
parent 1f37cd3932
commit e2f5df6208

View File

@ -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);
};