File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const canvasStore = useCanvasStore();
1717const authStore = useAccountStore ();
1818const api = useApi ();
1919const { initializeCanvas, drawCanvas } = useCanvas ();
20- useCanvasControls (canvasContainer );
20+ const { isSpacedPressed } = useCanvasControls (canvasContainer );
2121const { connectToGateway, place } = useCanvasGateway ();
2222
2323function onWindowResize() {
4343
4444function handleClick(event : PointerEvent ): void {
4545 if (! authStore .connected ) return ;
46+ if (isSpacedPressed .value ) return ;
4647
4748 const canvas = event .target as HTMLCanvasElement ;
4849 const rect = canvas .getBoundingClientRect ();
Original file line number Diff line number Diff line change @@ -91,4 +91,6 @@ export function useCanvasControls(container: Ref<HTMLDivElement | null>) {
9191 controls . removeEventListener ( 'mouseleave' , handleMouseUp ) ;
9292 controls . removeEventListener ( 'wheel' , handleWheel ) ;
9393 } ) ;
94+
95+ return { isSpacedPressed } ;
9496}
You can’t perform that action at this time.
0 commit comments