mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-04 16:17:06 +02:00
New element behavior
This commit is contained in:
@@ -1940,7 +1940,7 @@ const normalizeSelectedPoints = (
|
||||
return nextPoints.length ? nextPoints : null;
|
||||
};
|
||||
|
||||
export const pointDraggingUpdates = (
|
||||
const pointDraggingUpdates = (
|
||||
selectedPointsIndices: readonly number[],
|
||||
deltaX: number,
|
||||
deltaY: number,
|
||||
@@ -1991,6 +1991,9 @@ export const pointDraggingUpdates = (
|
||||
elementsMap,
|
||||
elements,
|
||||
app.state,
|
||||
{
|
||||
newArrow: !!app.state.newElement,
|
||||
},
|
||||
);
|
||||
|
||||
const originalStartGlobalPoint =
|
||||
|
@@ -9317,17 +9317,17 @@ class App extends React.Component<AppProps, AppState> {
|
||||
)!,
|
||||
});
|
||||
|
||||
if (isBindingElement(newElement, false)) {
|
||||
// When creating a linear element by dragging
|
||||
this.setState({
|
||||
suggestedBinding: maybeSuggestBindingsForBindingElementAtCoords(
|
||||
newElement,
|
||||
"end",
|
||||
this.scene,
|
||||
pointFrom<GlobalPoint>(pointerCoords.x, pointerCoords.y),
|
||||
),
|
||||
});
|
||||
}
|
||||
// if (isBindingElement(newElement, false)) {
|
||||
// // When creating a linear element by dragging
|
||||
// this.setState({
|
||||
// suggestedBinding: maybeSuggestBindingsForBindingElementAtCoords(
|
||||
// newElement,
|
||||
// "end",
|
||||
// this.scene,
|
||||
// pointFrom<GlobalPoint>(pointerCoords.x, pointerCoords.y),
|
||||
// ),
|
||||
// });
|
||||
// }
|
||||
} else {
|
||||
pointerDownState.lastCoords.x = pointerCoords.x;
|
||||
pointerDownState.lastCoords.y = pointerCoords.y;
|
||||
|
Reference in New Issue
Block a user