Quellcode durchsuchen

Attempt at moving the initial point when inside shape

Signed-off-by: Mark Tolmacs <[email protected]>
Mark Tolmacs vor 4 Monaten
Ursprung
Commit
cc01e16e52
1 geänderte Dateien mit 19 neuen und 0 gelöschten Zeilen
  1. 19 0
      packages/excalidraw/components/App.tsx

+ 19 - 0
packages/excalidraw/components/App.tsx

@@ -8772,6 +8772,25 @@ class App extends React.Component<AppProps, AppState> {
               false,
               { isDragging: true },
             );
+            LinearElementEditor.movePoints(newElement, [
+              {
+                index: 0,
+                isDragging: false,
+                point: toLocalPoint(
+                  getOutlineAvoidingPoint(
+                    newElement,
+                    pointFrom<GlobalPoint>(
+                      pointerDownState.origin.x,
+                      pointerDownState.origin.y,
+                    ),
+                    0,
+                    this.scene,
+                    this.state.zoom,
+                  ),
+                  newElement,
+                ),
+              },
+            ]);
           }
 
           this.setState({