Browse Source

cancel text via doubleclick when in multiElement mode (#926)

David Luzar 5 năm trước cách đây
mục cha
commit
95e726bd6f
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      src/components/App.tsx

+ 6 - 0
src/components/App.tsx

@@ -779,6 +779,12 @@ export class App extends React.Component<any, AppState> {
   private handleCanvasDoubleClick = (
     event: React.MouseEvent<HTMLCanvasElement>,
   ) => {
+    // case: double-clicking with arrow/line tool selected would both create
+    //  text and enter multiElement mode
+    if (this.state.multiElement) {
+      return;
+    }
+
     resetCursor();
 
     const { x, y } = viewportCoordsToSceneCoords(