Przeglądaj źródła

debounce context menu if app is resizing

zsviczian 6 miesięcy temu
rodzic
commit
332bc4d732
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      packages/excalidraw/components/App.tsx

+ 5 - 1
packages/excalidraw/components/App.tsx

@@ -6232,7 +6232,7 @@ class App extends React.Component<AppProps, AppState> {
 
   // set touch moving for mobile context menu
   private handleTouchMove = (event: React.TouchEvent<HTMLCanvasElement>) => {
-    invalidateContextMenu = true;
+    this.resetContextMenuTimer();
   };
 
   handleHoverSelectedLinearElement(
@@ -10426,6 +10426,10 @@ class App extends React.Component<AppProps, AppState> {
       return;
     }
 
+    if (this.state.isResizing) {
+      return;
+    }
+
     const { x, y } = viewportCoordsToSceneCoords(event, this.state);
     const element = this.getElementAtPosition(x, y, {
       preferSelected: true,