diff --git a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap index c2eb6eb72..0dc297ccc 100644 --- a/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap +++ b/packages/excalidraw/tests/__snapshots__/history.test.tsx.snap @@ -233,6 +233,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": undefined, "type": "arrow", "updated": 1, "version": 37, @@ -361,6 +362,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 493213705, + "width": 100, + "x": -100, + "y": -50, + }, "version": 36, "width": 88, "y": "16.71973", @@ -393,6 +428,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id1", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "version": 33, "width": 88, "y": "10.00000", @@ -450,6 +519,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "inside", }, + "suggestedBinding": undefined, "version": 37, "width": 94, "x": 0, @@ -475,6 +545,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 493213705, + "width": 100, + "x": -100, + "y": -50, + }, "version": 36, "width": 88, "x": 6, @@ -893,6 +997,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": undefined, "type": "arrow", "updated": 1, "version": 31, @@ -964,6 +1069,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 493213705, + "width": 100, + "x": -100, + "y": -50, + }, "version": 30, "width": 44, "y": "2.93333", @@ -996,6 +1135,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id1", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1996028265, + "width": 100, + "x": 100, + "y": -50, + }, "version": 29, "width": 0, "y": "9.99999", @@ -1045,6 +1218,7 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "inside", }, + "suggestedBinding": undefined, "version": 31, "width": 0, "x": 250, @@ -1070,6 +1244,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id0", + "index": "a0", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 493213705, + "width": 100, + "x": -100, + "y": -50, + }, "version": 30, "width": 44, "x": 144, @@ -2480,6 +2688,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id1", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 640725609, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "updated": 1, "version": 13, @@ -2646,6 +2888,40 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id4", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id1", + "index": "a1", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 640725609, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "version": 13, "width": 488, @@ -16269,6 +16545,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "updated": 1, "version": 13, @@ -16324,6 +16634,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "version": 13, }, "inserted": { @@ -16344,6 +16688,35 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 4, + "versionNonce": 888958951, + "width": 100, + "x": 100, + "y": -50, + }, "version": 10, }, }, @@ -16685,6 +17058,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "version": 9, "width": 88, @@ -17016,6 +17423,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "updated": 1, "version": 13, @@ -17322,6 +17763,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "version": 13, "width": "88.00000", @@ -17661,6 +18136,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "updated": 1, "version": 13, @@ -17967,6 +18476,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "version": 13, "width": "88.00000", @@ -18304,6 +18847,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "updated": 1, "version": 13, @@ -18375,6 +18952,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "version": 13, }, "inserted": { @@ -18387,6 +18998,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "mode": "orbit", }, "startBinding": null, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "version": 10, }, }, @@ -18696,6 +19341,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "version": 9, "width": 88, @@ -19055,6 +19734,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "updated": 1, "version": 14, @@ -19137,11 +19850,79 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding ], "mode": "orbit", }, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "version": 14, }, "inserted": { "endBinding": null, "startBinding": null, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "version": 11, }, }, @@ -19443,6 +20224,40 @@ exports[`history > singleplayer undo/redo > should support bidirectional binding "strokeColor": "#1e1e1e", "strokeStyle": "solid", "strokeWidth": 2, + "suggestedBinding": { + "angle": 0, + "backgroundColor": "transparent", + "boundElements": [ + { + "id": "id13", + "type": "arrow", + }, + ], + "customData": undefined, + "fillStyle": "solid", + "frameId": null, + "groupIds": [], + "height": 100, + "id": "id2", + "index": "a2", + "isDeleted": false, + "link": null, + "locked": false, + "opacity": 100, + "roughness": 1, + "roundness": null, + "seed": 1, + "strokeColor": "#1e1e1e", + "strokeStyle": "solid", + "strokeWidth": 2, + "type": "rectangle", + "updated": 1, + "version": 3, + "versionNonce": 1163661225, + "width": 100, + "x": 100, + "y": -50, + }, "type": "arrow", "version": 9, "width": 88,