From 314490f711945b8cc9211495ca6be57062268e3d Mon Sep 17 00:00:00 2001 From: simonbethke Date: Thu, 7 Nov 2024 13:10:35 +0100 Subject: [PATCH] fix accidential drag --- src/ui/view-cube.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ui/view-cube.ts b/src/ui/view-cube.ts index 02e3d036..73281278 100644 --- a/src/ui/view-cube.ts +++ b/src/ui/view-cube.ts @@ -81,12 +81,12 @@ class ViewCube extends Container { pz: circle(b, true, 'Z'), }; - shapes.px.children[0].addEventListener('pointerdown', () => { events.fire('camera.align', 'px'); }); - shapes.py.children[0].addEventListener('pointerdown', () => { events.fire('camera.align', 'py'); }); - shapes.pz.children[0].addEventListener('pointerdown', () => { events.fire('camera.align', 'pz'); }); - shapes.nx.children[0].addEventListener('pointerdown', () => { events.fire('camera.align', 'nx'); }); - shapes.ny.children[0].addEventListener('pointerdown', () => { events.fire('camera.align', 'ny'); }); - shapes.nz.children[0].addEventListener('pointerdown', () => { events.fire('camera.align', 'nz'); }); + shapes.px.children[0].addEventListener('pointerdown', (e) => { events.fire('camera.align', 'px'); e.stopPropagation(); }); + shapes.py.children[0].addEventListener('pointerdown', (e) => { events.fire('camera.align', 'py'); e.stopPropagation(); }); + shapes.pz.children[0].addEventListener('pointerdown', (e) => { events.fire('camera.align', 'pz'); e.stopPropagation(); }); + shapes.nx.children[0].addEventListener('pointerdown', (e) => { events.fire('camera.align', 'nx'); e.stopPropagation(); }); + shapes.ny.children[0].addEventListener('pointerdown', (e) => { events.fire('camera.align', 'ny'); e.stopPropagation(); }); + shapes.nz.children[0].addEventListener('pointerdown', (e) => { events.fire('camera.align', 'nz'); e.stopPropagation(); }); this.dom.appendChild(svg);