fix:Tool lock binding behavior restored

This commit is contained in:
Mark Tolmacs 2025-09-17 20:52:52 +02:00
parent 43816eb62d
commit 50e58abfd3
No known key found for this signature in database
5 changed files with 38 additions and 829 deletions

View File

@ -217,7 +217,7 @@ describe("Test Linear Elements", () => {
// drag line from midpoint
drag(midpoint, pointFrom(midpoint[0] + delta, midpoint[1] + delta));
expect(renderInteractiveScene.mock.calls.length).toMatchInlineSnapshot(`9`);
expect(renderInteractiveScene.mock.calls.length).toMatchInlineSnapshot(`8`);
expect(renderStaticScene.mock.calls.length).toMatchInlineSnapshot(`7`);
expect(line.points.length).toEqual(3);
expect(line.points).toMatchInlineSnapshot(`
@ -329,7 +329,7 @@ describe("Test Linear Elements", () => {
expect(h.state.selectedLinearElement?.isEditing).toBe(false);
mouse.doubleClick();
expect(h.state.selectedLinearElement).toBe(null);
expect(h.state.selectedLinearElement?.isEditing).toBe(false);
await getTextEditor();
});
@ -357,6 +357,7 @@ describe("Test Linear Elements", () => {
const originalY = line.y;
enterLineEditingMode(line);
expect(h.state.selectedLinearElement?.isEditing).toBe(true);
expect(line.points.length).toEqual(2);
mouse.clickAt(midpoint[0], midpoint[1]);

View File

@ -7809,7 +7809,10 @@ class App extends React.Component<AppProps, AppState> {
selectedLinearElement: prevState.selectedLinearElement
? {
...prevState.selectedLinearElement,
isEditing: isBindingElement(hitElement),
isEditing:
!!hitElement &&
hitElement.id ===
this.state.selectedLinearElement?.elementId,
}
: null,
selectedElementIds: prevState.selectedLinearElement

View File

@ -234,7 +234,6 @@ 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,
@ -363,40 +362,6 @@ 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",
@ -429,40 +394,6 @@ 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",
@ -520,7 +451,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
"mode": "inside",
},
"suggestedBinding": undefined,
"version": 37,
"width": 94,
"x": 0,
@ -546,40 +476,6 @@ 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,
@ -999,7 +895,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"suggestedBinding": undefined,
"type": "arrow",
"updated": 1,
"version": 34,
@ -1071,40 +966,6 @@ 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": 33,
"width": "44.00000",
"y": "2.93333",
@ -1137,40 +998,6 @@ 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": 31,
"width": "6.00000",
"y": 10,
@ -1220,7 +1047,6 @@ exports[`history > multiplayer undo/redo > conflicts in arrows and their bindabl
],
"mode": "inside",
},
"suggestedBinding": undefined,
"version": 34,
"width": 0,
"x": 250,
@ -1246,40 +1072,6 @@ 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": 33,
"width": "44.00000",
"x": 144,
@ -2694,40 +2486,6 @@ 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,
@ -2894,40 +2652,6 @@ 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,
@ -16600,40 +16324,6 @@ 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,
@ -16689,40 +16379,6 @@ 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": {
@ -16743,35 +16399,6 @@ 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,
},
},
@ -17113,40 +16740,6 @@ 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,
@ -17479,40 +17072,6 @@ 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,
@ -17819,40 +17378,6 @@ 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",
@ -18193,40 +17718,6 @@ 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,
@ -18533,40 +18024,6 @@ 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",
@ -18905,40 +18362,6 @@ 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,
@ -19010,40 +18433,6 @@ 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": {
@ -19056,40 +18445,6 @@ 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,
},
},
@ -19399,40 +18754,6 @@ 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,
@ -19793,40 +19114,6 @@ 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,
@ -19909,79 +19196,11 @@ 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,
},
},
@ -20283,40 +19502,6 @@ 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,

View File

@ -6235,7 +6235,34 @@ exports[`regression tests > draw every type of shape > [end of test] appState 1`
"selectedElementIds": {},
"selectedElementsAreBeingDragged": false,
"selectedGroupIds": {},
"selectedLinearElement": null,
"selectedLinearElement": {
"customLineAngle": null,
"elbowed": false,
"elementId": "id20",
"hoverPointIndex": -1,
"initialState": {
"arrowStartIsInside": false,
"lastClickedPoint": -1,
"origin": null,
"prevSelectedPointsIndices": null,
"segmentMidpoint": {
"added": false,
"index": null,
"value": null,
},
},
"isDragging": false,
"isEditing": false,
"lastCommittedPoint": null,
"lastUncommittedPoint": null,
"pointerDownState": undefined,
"pointerOffset": {
"x": 0,
"y": 0,
},
"segmentMidPointHoveredCoords": null,
"selectedPointsIndices": null,
},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
"showHyperlinkPopup": false,
@ -6863,15 +6890,8 @@ exports[`regression tests > draw every type of shape > [end of test] undo stack
{
"appState": AppStateDelta {
"delta": Delta {
"deleted": {
"selectedLinearElement": null,
},
"inserted": {
"selectedLinearElement": {
"elementId": "id20",
"isEditing": false,
},
},
"deleted": {},
"inserted": {},
},
},
"elements": {

View File

@ -102,7 +102,7 @@ describe("move element", () => {
new Pointer("mouse").clickOn(rectB);
expect(renderInteractiveScene.mock.calls.length).toMatchInlineSnapshot(
`16`,
`15`,
);
expect(renderStaticScene.mock.calls.length).toMatchInlineSnapshot(`14`);
expect(h.state.selectionElement).toBeNull();