From dca78acdf2f74fa9ba9ea74c62c2a00b58c2125e Mon Sep 17 00:00:00 2001 From: Andrew Varga Date: Mon, 17 Mar 2025 19:45:20 +0100 Subject: [PATCH] #4236 Fix corner rect panning bug (#5817) * check mouse button in * same for center rectangle --------- Co-authored-by: 49fl --- src/machines/modelingMachine.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/machines/modelingMachine.ts b/src/machines/modelingMachine.ts index 18368b9c1..fb250022c 100644 --- a/src/machines/modelingMachine.ts +++ b/src/machines/modelingMachine.ts @@ -862,6 +862,8 @@ export const modelingMachine = setup({ } sceneInfra.setCallbacks({ onClick: (args) => { + if (!args) return + if (args.mouseEvent.which !== 1) return const twoD = args.intersectionPoint?.twoD if (twoD) { sceneInfra.modelingSend({ @@ -893,6 +895,8 @@ export const modelingMachine = setup({ } sceneInfra.setCallbacks({ onClick: (args) => { + if (!args) return + if (args.mouseEvent.which !== 1) return const twoD = args.intersectionPoint?.twoD if (twoD) { sceneInfra.modelingSend({