feat: Center binding on SHIFT key

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Mark Tolmacs
2025-09-29 10:55:02 +02:00
parent 0232917443
commit 1744c7aa56
2 changed files with 12 additions and 3 deletions

View File

@@ -354,6 +354,7 @@ export class LinearElementEditor {
element,
elements,
app,
event.shiftKey,
);
LinearElementEditor.movePoints(element, app.scene, positions, {
@@ -517,6 +518,7 @@ export class LinearElementEditor {
element,
elements,
app,
event.shiftKey,
);
LinearElementEditor.movePoints(element, app.scene, positions, {
@@ -2054,6 +2056,7 @@ const pointDraggingUpdates = (
element: NonDeleted<ExcalidrawLinearElement>,
elements: readonly Ordered<NonDeletedExcalidrawElement>[],
app: AppClassProperties,
shiftKey: boolean,
): {
positions: PointsPositionUpdates;
updates?: PointMoveOtherUpdates;
@@ -2099,6 +2102,7 @@ const pointDraggingUpdates = (
app.state,
{
newArrow: !!app.state.newElement,
shiftKey,
},
);