fix: Arrow drag start in bindable area jumps across bindable (#10676)

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
Márk Tolmács
2026-01-20 12:38:40 +01:00
committed by GitHub
parent 60ab14c2f6
commit 9ba0f5dbc9
5 changed files with 137 additions and 146 deletions
+6 -18
View File
@@ -1590,9 +1590,7 @@ describe("history", () => {
expect(API.getUndoStack().length).toBe(5);
expect(arrow.startBinding).toEqual({
elementId: rect1.id,
fixedPoint: expect.arrayContaining([
0.5379561888991137, 0.5379561888991137,
]),
fixedPoint: expect.arrayContaining([0.5001, 0.5001]),
mode: "orbit",
});
expect(arrow.endBinding).toEqual({
@@ -1615,9 +1613,7 @@ describe("history", () => {
expect(API.getRedoStack().length).toBe(1);
expect(arrow.startBinding).toEqual({
elementId: rect1.id,
fixedPoint: expect.arrayContaining([
0.5379561888991137, 0.5379561888991137,
]),
fixedPoint: expect.arrayContaining([0.5001, 0.5001]),
mode: "orbit",
});
expect(arrow.endBinding).toEqual({
@@ -1640,9 +1636,7 @@ describe("history", () => {
expect(API.getRedoStack().length).toBe(0);
expect(arrow.startBinding).toEqual({
elementId: rect1.id,
fixedPoint: expect.arrayContaining([
0.5379561888991137, 0.5379561888991137,
]),
fixedPoint: expect.arrayContaining([0.5001, 0.5001]),
mode: "orbit",
});
expect(arrow.endBinding).toEqual({
@@ -1673,9 +1667,7 @@ describe("history", () => {
expect(API.getRedoStack().length).toBe(0);
expect(arrow.startBinding).toEqual({
elementId: rect1.id,
fixedPoint: expect.arrayContaining([
0.5379561888991137, 0.5379561888991137,
]),
fixedPoint: expect.arrayContaining([0.5001, 0.5001]),
mode: "orbit",
});
expect(arrow.endBinding).toEqual({
@@ -1698,9 +1690,7 @@ describe("history", () => {
expect(API.getRedoStack().length).toBe(1);
expect(arrow.startBinding).toEqual({
elementId: rect1.id,
fixedPoint: expect.arrayContaining([
0.5379561888991137, 0.5379561888991137,
]),
fixedPoint: expect.arrayContaining([0.5001, 0.5001]),
mode: "orbit",
});
expect(arrow.endBinding).toEqual({
@@ -5061,9 +5051,7 @@ describe("history", () => {
id: arrowId,
startBinding: expect.objectContaining({
elementId: rect1.id,
fixedPoint: expect.arrayContaining([
0.548442798411514, 0.548442798411514,
]),
fixedPoint: expect.arrayContaining([0.5001, 0.5001]),
}),
endBinding: expect.objectContaining({
elementId: rect2.id,