Remove invariants from debug

feat: expose `applyTo` options, don't commit empty text element (#9744)

* Expose applyTo options, skip re-draw for empty text

* Don't commit empty text elements

test: added test file for distribute (#9754)
This commit is contained in:
Mark Tolmacs
2025-07-15 19:11:30 +02:00
parent 1739fa92b1
commit 263d6805e4
8 changed files with 862 additions and 1947 deletions

View File

@ -188,13 +188,6 @@ const renderBindings = (
}
if (element.endBinding) {
invariant(
elementsMap
.get(element.endBinding.elementId)
?.boundElements?.find((e) => e.id === element.id),
"Missing record in boundElements for arrow",
);
_renderBinding(
context,
element.endBinding,
@ -217,17 +210,7 @@ const renderBindings = (
boundElement.id,
) as ExcalidrawArrowElement;
invariant(
arrow,
"Arrow element registered as a bound object not found in elementsMap",
);
invariant(
arrow.startBinding?.elementId === element.id ||
arrow.endBinding?.elementId === element.id,
"Arrow element registered as a bound object not found in binding on the arrow element",
);
if (arrow.startBinding?.elementId === element.id) {
if (arrow && arrow.startBinding?.elementId === element.id) {
_renderBindableBinding(
arrow.startBinding,
context,
@ -238,7 +221,7 @@ const renderBindings = (
"green",
);
}
if (arrow.endBinding?.elementId === element.id) {
if (arrow && arrow.endBinding?.elementId === element.id) {
_renderBindableBinding(
arrow.endBinding,
context,

View File

@ -49,9 +49,3 @@ exports[`Test Linear Elements > Test bound text element > should wrap the bound
"Online whiteboard
collaboration made easy"
`;
exports[`Test Linear Elements > Test bound text element > should wrap the bound text when arrow bound container moves 2`] = `
"Online whiteboard
collaboration made
easy"
`;

View File

@ -92,8 +92,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
0.04,
0.4633333333333333,
],
"focus": 0,
"gap": 0,
"mode": "orbit",
},
"fillStyle": "solid",
"frameId": null,
@ -126,8 +125,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
1,
0.5001,
],
"focus": 0,
"gap": 0,
"mode": "orbit",
},
"strokeColor": "#1864ab",
"strokeStyle": "solid",
@ -152,8 +150,11 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"endArrowhead": "arrow",
"endBinding": {
"elementId": "ellipse-1",
"focus": 0.10666666666666667,
"gap": 3.8343264684446097,
"fixedPoint": [
-0.01,
0.44666666666666666,
],
"mode": "orbit",
},
"fillStyle": "solid",
"frameId": null,
@ -182,8 +183,11 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing s
"startArrowhead": null,
"startBinding": {
"elementId": "diamond-1",
"focus": 0,
"gap": 4.535423522449215,
"fixedPoint": [
0.9357142857142857,
0.5001,
],
"mode": "orbit",
},
"strokeColor": "#e67700",
"strokeStyle": "solid",
@ -346,8 +350,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
-2.05,
0.5001,
],
"focus": 0,
"gap": 0,
"mode": "orbit",
},
"fillStyle": "solid",
"frameId": null,
@ -380,8 +383,7 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
1,
0.5001,
],
"focus": 0,
"gap": 0,
"mode": "orbit",
},
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
@ -437,392 +439,6 @@ exports[`Test Transform > Test arrow bindings > should bind arrows to existing t
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 1`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id40",
"type": "text",
},
],
"customData": undefined,
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
"elementId": "id42",
"fixedPoint": [
0,
0.5001,
],
"focus": 0,
"gap": 0,
},
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": 0,
"id": Any<String>,
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": null,
"link": null,
"locked": false,
"opacity": 100,
"points": [
[
0,
0,
],
[
99,
0,
],
],
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"startArrowhead": null,
"startBinding": {
"elementId": "id41",
"fixedPoint": [
1,
0.5001,
],
"focus": 0,
"gap": 0,
},
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "arrow",
"updated": 1,
"version": 4,
"versionNonce": Any<Number>,
"width": 100,
"x": 255.5,
"y": 239,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 2`] = `
{
"angle": 0,
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
"containerId": "id39",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
"fontSize": 20,
"frameId": null,
"groupIds": [],
"height": 25,
"id": Any<String>,
"index": "a1",
"isDeleted": false,
"lineHeight": 1.25,
"link": null,
"locked": false,
"opacity": 100,
"originalText": "HELLO WORLD!!",
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"text": "HELLO WORLD!!",
"textAlign": "center",
"type": "text",
"updated": 1,
"version": 3,
"versionNonce": Any<Number>,
"verticalAlign": "middle",
"width": 130,
"x": 240,
"y": 226.5,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 3`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id39",
"type": "arrow",
},
],
"customData": undefined,
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": 100,
"id": Any<String>,
"index": "a2",
"isDeleted": false,
"link": null,
"locked": false,
"opacity": 100,
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "rectangle",
"updated": 1,
"version": 3,
"versionNonce": Any<Number>,
"width": 100,
"x": 155,
"y": 189,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to shapes when start / end provided without ids 4`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id39",
"type": "arrow",
},
],
"customData": undefined,
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": 100,
"id": Any<String>,
"index": "a3",
"isDeleted": false,
"link": null,
"locked": false,
"opacity": 100,
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "ellipse",
"updated": 1,
"version": 3,
"versionNonce": Any<Number>,
"width": 100,
"x": 355,
"y": 189,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 1`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id44",
"type": "text",
},
],
"customData": undefined,
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
"elementId": "id46",
"fixedPoint": [
0,
0.5001,
],
"focus": 0,
"gap": 0,
},
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": 0,
"id": Any<String>,
"index": "a0",
"isDeleted": false,
"lastCommittedPoint": null,
"link": null,
"locked": false,
"opacity": 100,
"points": [
[
0,
0,
],
[
99,
0,
],
],
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"startArrowhead": null,
"startBinding": {
"elementId": "id45",
"fixedPoint": [
1,
0.5001,
],
"focus": 0,
"gap": 0,
},
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "arrow",
"updated": 1,
"version": 4,
"versionNonce": Any<Number>,
"width": 100,
"x": 255.5,
"y": 239,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 2`] = `
{
"angle": 0,
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": null,
"containerId": "id43",
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
"fontSize": 20,
"frameId": null,
"groupIds": [],
"height": 25,
"id": Any<String>,
"index": "a1",
"isDeleted": false,
"lineHeight": 1.25,
"link": null,
"locked": false,
"opacity": 100,
"originalText": "HELLO WORLD!!",
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"text": "HELLO WORLD!!",
"textAlign": "center",
"type": "text",
"updated": 1,
"version": 3,
"versionNonce": Any<Number>,
"verticalAlign": "middle",
"width": 130,
"x": 240,
"y": 226.5,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 3`] = `
{
"angle": 0,
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id43",
"type": "arrow",
},
],
"containerId": null,
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
"fontSize": 20,
"frameId": null,
"groupIds": [],
"height": 25,
"id": Any<String>,
"index": "a2",
"isDeleted": false,
"lineHeight": 1.25,
"link": null,
"locked": false,
"opacity": 100,
"originalText": "HEYYYYY",
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"text": "HEYYYYY",
"textAlign": "left",
"type": "text",
"updated": 1,
"version": 3,
"versionNonce": Any<Number>,
"verticalAlign": "top",
"width": 70,
"x": 185,
"y": 226.5,
}
`;
exports[`Test Transform > Test arrow bindings > should bind arrows to text when start / end provided without ids 4`] = `
{
"angle": 0,
"autoResize": true,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id43",
"type": "arrow",
},
],
"containerId": null,
"customData": undefined,
"fillStyle": "solid",
"fontFamily": 5,
"fontSize": 20,
"frameId": null,
"groupIds": [],
"height": 25,
"id": Any<String>,
"index": "a3",
"isDeleted": false,
"lineHeight": 1.25,
"link": null,
"locked": false,
"opacity": 100,
"originalText": "WHATS UP ?",
"roughness": 1,
"roundness": null,
"seed": Any<Number>,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"text": "WHATS UP ?",
"textAlign": "left",
"type": "text",
"updated": 1,
"version": 3,
"versionNonce": Any<Number>,
"verticalAlign": "top",
"width": 100,
"x": 355,
"y": 226.5,
}
`;
exports[`Test Transform > should not allow duplicate ids 1`] = `
{
"angle": 0,
@ -1508,8 +1124,11 @@ exports[`Test Transform > should transform the elements correctly when linear el
"endArrowhead": "arrow",
"endBinding": {
"elementId": "Alice",
"focus": -0,
"gap": 5.299874999999986,
"fixedPoint": [
-0.07542628418945944,
0.5001,
],
"mode": "orbit",
},
"fillStyle": "solid",
"frameId": null,
@ -1540,8 +1159,11 @@ exports[`Test Transform > should transform the elements correctly when linear el
"startArrowhead": null,
"startBinding": {
"elementId": "Bob",
"focus": 0,
"gap": 1,
"fixedPoint": [
1.000004978564514,
0.5001,
],
"mode": "orbit",
},
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
@ -1575,8 +1197,7 @@ exports[`Test Transform > should transform the elements correctly when linear el
0.46387050630528887,
0.48466257668711654,
],
"focus": 0,
"gap": 0,
"mode": "orbit",
},
"fillStyle": "solid",
"frameId": null,
@ -1607,8 +1228,7 @@ exports[`Test Transform > should transform the elements correctly when linear el
0.39381496335223337,
1,
],
"focus": 0,
"gap": 0,
"mode": "orbit",
},
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",

View File

@ -11,7 +11,7 @@ exports[`contextMenu element > right-clicking on a group should select whole gro
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": {
"items": [
@ -1084,7 +1084,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -1298,7 +1298,7 @@ exports[`contextMenu element > selecting 'Bring forward' in context menu brings
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -1629,7 +1629,7 @@ exports[`contextMenu element > selecting 'Bring to front' in context menu brings
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -1960,7 +1960,7 @@ exports[`contextMenu element > selecting 'Copy styles' in context menu copies st
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2174,7 +2174,7 @@ exports[`contextMenu element > selecting 'Delete' in context menu deletes elemen
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2415,7 +2415,7 @@ exports[`contextMenu element > selecting 'Duplicate' in context menu duplicates
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2713,7 +2713,7 @@ exports[`contextMenu element > selecting 'Group selection' in context menu group
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3085,7 +3085,7 @@ exports[`contextMenu element > selecting 'Paste styles' in context menu pastes s
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3578,7 +3578,7 @@ exports[`contextMenu element > selecting 'Send backward' in context menu sends e
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3901,7 +3901,7 @@ exports[`contextMenu element > selecting 'Send to back' in context menu sends el
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -4224,7 +4224,7 @@ exports[`contextMenu element > selecting 'Ungroup selection' in context menu ung
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -4635,7 +4635,7 @@ exports[`contextMenu element > shows 'Group selection' in context menu for multi
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": {
"items": [
@ -5852,7 +5852,7 @@ exports[`contextMenu element > shows 'Ungroup selection' in context menu for gro
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": {
"items": [
@ -7120,7 +7120,7 @@ exports[`contextMenu element > shows context menu for canvas > [end of test] app
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": {
"items": [
@ -7787,7 +7787,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": {
"items": [
@ -8778,7 +8778,7 @@ exports[`contextMenu element > shows context menu for element > [end of test] ap
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": {
"items": [

File diff suppressed because it is too large Load Diff

View File

@ -95,142 +95,3 @@ exports[`move element > rectangle 5`] = `
"y": 40,
}
`;
exports[`move element > rectangles with binding arrow 5`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id6",
"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": 1278240551,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "rectangle",
"updated": 1,
"version": 4,
"versionNonce": 1006504105,
"width": 100,
"x": 0,
"y": 0,
}
`;
exports[`move element > rectangles with binding arrow 6`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": [
{
"id": "id6",
"type": "arrow",
},
],
"customData": undefined,
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": 300,
"id": "id3",
"index": "a1",
"isDeleted": false,
"link": null,
"locked": false,
"opacity": 100,
"roughness": 1,
"roundness": null,
"seed": 1116226695,
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "rectangle",
"updated": 1,
"version": 7,
"versionNonce": 1984422985,
"width": 300,
"x": 201,
"y": 2,
}
`;
exports[`move element > rectangles with binding arrow 7`] = `
{
"angle": 0,
"backgroundColor": "transparent",
"boundElements": null,
"customData": undefined,
"elbowed": false,
"endArrowhead": "arrow",
"endBinding": {
"elementId": "id3",
"fixedPoint": [
"0.50000",
"0.50000",
],
"mode": "outline",
},
"fillStyle": "solid",
"frameId": null,
"groupIds": [],
"height": "102.02000",
"id": "id6",
"index": "a2",
"isDeleted": false,
"lastCommittedPoint": null,
"link": null,
"locked": false,
"moveMidPointsWithElement": false,
"opacity": 100,
"points": [
[
0,
0,
],
[
"301.02000",
"102.02000",
],
],
"roughness": 1,
"roundness": {
"type": 2,
},
"seed": 23633383,
"startArrowhead": null,
"startBinding": {
"elementId": "id0",
"fixedPoint": [
"0.50000",
"0.50000",
],
"mode": "outline",
},
"strokeColor": "#1e1e1e",
"strokeStyle": "solid",
"strokeWidth": 2,
"type": "arrow",
"updated": 1,
"version": 11,
"versionNonce": 1573789895,
"width": "301.02000",
"x": "50.01000",
"y": "50.01000",
}
`;

View File

@ -11,7 +11,7 @@ exports[`given element A and group of elements B and given both are selected whe
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -437,7 +437,7 @@ exports[`given element A and group of elements B and given both are selected whe
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -853,7 +853,7 @@ exports[`regression tests > Cmd/Ctrl-click exclusively select element under poin
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -1419,7 +1419,7 @@ exports[`regression tests > Drags selected element when hitting only bounding bo
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -1626,7 +1626,7 @@ exports[`regression tests > adjusts z order when grouping > [end of test] appSta
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2010,7 +2010,7 @@ exports[`regression tests > alt-drag duplicates an element > [end of test] appSt
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2255,7 +2255,7 @@ exports[`regression tests > arrow keys > [end of test] appState 1`] = `
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2435,7 +2435,7 @@ exports[`regression tests > can drag element that covers another element, while
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -2760,7 +2760,7 @@ exports[`regression tests > change the properties of a shape > [end of test] app
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3015,7 +3015,7 @@ exports[`regression tests > click on an element and drag it > [dragged] appState
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3256,7 +3256,7 @@ exports[`regression tests > click on an element and drag it > [end of test] appS
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3492,7 +3492,7 @@ exports[`regression tests > click to select a shape > [end of test] appState 1`]
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -3750,7 +3750,7 @@ exports[`regression tests > click-drag to select a group > [end of test] appStat
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -4064,7 +4064,7 @@ exports[`regression tests > deleting last but one element in editing group shoul
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -4500,7 +4500,7 @@ exports[`regression tests > deselects group of selected elements on pointer down
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -4783,7 +4783,7 @@ exports[`regression tests > deselects group of selected elements on pointer up w
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -5059,7 +5059,7 @@ exports[`regression tests > deselects selected element on pointer down when poin
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -5267,7 +5267,7 @@ exports[`regression tests > deselects selected element, on pointer up, when clic
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -5467,7 +5467,7 @@ exports[`regression tests > double click to edit a group > [end of test] appStat
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -5860,7 +5860,7 @@ exports[`regression tests > drags selected elements from point inside common bou
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -6157,7 +6157,7 @@ exports[`regression tests > draw every type of shape > [end of test] appState 1`
"locked": false,
"type": "freedraw",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -6993,7 +6993,7 @@ exports[`regression tests > given a group of selected elements with an element t
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -7327,7 +7327,7 @@ exports[`regression tests > given a selected element A and a not selected elemen
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -7606,7 +7606,7 @@ exports[`regression tests > given selected element A with lower z-index than uns
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -7841,7 +7841,7 @@ exports[`regression tests > given selected element A with lower z-index than uns
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -8081,7 +8081,7 @@ exports[`regression tests > key 2 selects rectangle tool > [end of test] appStat
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -8261,7 +8261,7 @@ exports[`regression tests > key 3 selects diamond tool > [end of test] appState
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -8441,7 +8441,7 @@ exports[`regression tests > key 4 selects ellipse tool > [end of test] appState
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -8621,7 +8621,7 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1`
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -8706,7 +8706,6 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1`
"customLineAngle": null,
"elbowed": false,
"elementId": "id0",
"endBindingElement": "keep",
"hoverPointIndex": -1,
"isDragging": false,
"lastUncommittedPoint": null,
@ -8727,7 +8726,6 @@ exports[`regression tests > key 5 selects arrow tool > [end of test] appState 1`
},
"segmentMidPointHoveredCoords": null,
"selectedPointsIndices": null,
"startBindingElement": "keep",
},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
@ -8847,7 +8845,7 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`]
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -8932,7 +8930,6 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`]
"customLineAngle": null,
"elbowed": false,
"elementId": "id0",
"endBindingElement": "keep",
"hoverPointIndex": -1,
"isDragging": false,
"lastUncommittedPoint": null,
@ -8953,7 +8950,6 @@ exports[`regression tests > key 6 selects line tool > [end of test] appState 1`]
},
"segmentMidPointHoveredCoords": null,
"selectedPointsIndices": null,
"startBindingElement": "keep",
},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
@ -9071,7 +9067,7 @@ exports[`regression tests > key 7 selects freedraw tool > [end of test] appState
"locked": false,
"type": "freedraw",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -9267,7 +9263,7 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1`
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -9352,7 +9348,6 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1`
"customLineAngle": null,
"elbowed": false,
"elementId": "id0",
"endBindingElement": "keep",
"hoverPointIndex": -1,
"isDragging": false,
"lastUncommittedPoint": null,
@ -9373,7 +9368,6 @@ exports[`regression tests > key a selects arrow tool > [end of test] appState 1`
},
"segmentMidPointHoveredCoords": null,
"selectedPointsIndices": null,
"startBindingElement": "keep",
},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
@ -9493,7 +9487,7 @@ exports[`regression tests > key d selects diamond tool > [end of test] appState
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -9673,7 +9667,7 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`]
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -9758,7 +9752,6 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`]
"customLineAngle": null,
"elbowed": false,
"elementId": "id0",
"endBindingElement": "keep",
"hoverPointIndex": -1,
"isDragging": false,
"lastUncommittedPoint": null,
@ -9779,7 +9772,6 @@ exports[`regression tests > key l selects line tool > [end of test] appState 1`]
},
"segmentMidPointHoveredCoords": null,
"selectedPointsIndices": null,
"startBindingElement": "keep",
},
"selectionElement": null,
"shouldCacheIgnoreZoom": false,
@ -9897,7 +9889,7 @@ exports[`regression tests > key o selects ellipse tool > [end of test] appState
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -10077,7 +10069,7 @@ exports[`regression tests > key p selects freedraw tool > [end of test] appState
"locked": false,
"type": "freedraw",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -10273,7 +10265,7 @@ exports[`regression tests > key r selects rectangle tool > [end of test] appStat
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -10453,7 +10445,7 @@ exports[`regression tests > make a group and duplicate it > [end of test] appSta
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -10984,7 +10976,7 @@ exports[`regression tests > noop interaction after undo shouldn't create history
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -11264,7 +11256,7 @@ exports[`regression tests > pinch-to-zoom works > [end of test] appState 1`] = `
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -11387,7 +11379,7 @@ exports[`regression tests > shift click on selected element should deselect it o
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -11587,7 +11579,7 @@ exports[`regression tests > shift-click to multiselect, then drag > [end of test
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -11906,7 +11898,7 @@ exports[`regression tests > should group elements and ungroup them > [end of tes
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -12335,7 +12327,7 @@ exports[`regression tests > single-clicking on a subgroup of a selected group sh
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -12975,7 +12967,7 @@ exports[`regression tests > spacebar + drag scrolls the canvas > [end of test] a
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -13101,7 +13093,7 @@ exports[`regression tests > supports nested groups > [end of test] appState 1`]
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -13732,7 +13724,7 @@ exports[`regression tests > switches from group of selected elements to another
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -14071,7 +14063,7 @@ exports[`regression tests > switches selected element on pointer down > [end of
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -14335,7 +14327,7 @@ exports[`regression tests > two-finger scroll works > [end of test] appState 1`]
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -14458,7 +14450,7 @@ exports[`regression tests > undo/redo drawing an element > [end of test] appStat
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -14851,7 +14843,7 @@ exports[`regression tests > updates fontSize & fontFamily appState > [end of tes
"locked": false,
"type": "text",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,
@ -14974,7 +14966,7 @@ exports[`regression tests > zoom hotkeys > [end of test] appState 1`] = `
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,

View File

@ -11,7 +11,7 @@ exports[`exportToSvg > with default arguments 1`] = `
"locked": false,
"type": "selection",
},
"bindMode": "focus",
"bindMode": "orbit",
"collaborators": Map {},
"contextMenu": null,
"croppingElementId": null,