From 19abf76834befba22f43d7cd026b7829196cd0b3 Mon Sep 17 00:00:00 2001 From: ColemanDunn <42652642+ColemanDunn@users.noreply.github.com> Date: Mon, 27 Jan 2025 18:33:01 -0700 Subject: [PATCH] renamed `isRightClickDragging` to `isRightClicked` --- packages/excalidraw/components/App.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index a6bac55f1..5045a526e 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -6712,13 +6712,13 @@ class App extends React.Component { public handleCanvasPan = ( event: React.PointerEvent | MouseEvent, ): boolean => { - const isRightClickDragging = event.button === POINTER_BUTTON.SECONDARY; + const isRightClicked = event.button === POINTER_BUTTON.SECONDARY; if ( !( gesture.pointers.size <= 1 && (event.button === POINTER_BUTTON.WHEEL || (event.button === POINTER_BUTTON.MAIN && isHoldingSpace) || - isRightClickDragging || + isRightClicked || isHandToolActive(this.state) || this.state.viewModeEnabled) ) @@ -6746,13 +6746,13 @@ class App extends React.Component { ? false : /Linux/.test(window.navigator.platform); - if (!isRightClickDragging) { + if (!isRightClicked) { setCursor(this.interactiveCanvas, CURSOR_TYPE.GRABBING); } let { clientX: lastX, clientY: lastY } = event; let hasDragged = false; const onPointerMove = withBatchedUpdatesThrottled((event: PointerEvent) => { - if (isRightClickDragging && !hasDragged) { + if (isRightClicked && !hasDragged) { setCursor(this.interactiveCanvas, CURSOR_TYPE.GRABBING); } hasDragged = true; @@ -6819,7 +6819,7 @@ class App extends React.Component { window.removeEventListener(EVENT.POINTER_UP, teardown); window.removeEventListener(EVENT.BLUR, teardown); onPointerMove.flush(); - if (!hasDragged && isRightClickDragging) { + if (!hasDragged && isRightClicked) { this.handleCanvasContextMenu( event as React.MouseEvent, );