mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: tweak editing behavior (#2668)
* feat: tweak editing behavior * fix tests Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
0cf5f1ac1f
commit
bc414ccaaf
5 changed files with 161 additions and 133 deletions
|
@ -18537,7 +18537,9 @@ Object {
|
|||
"offsetLeft": 0,
|
||||
"offsetTop": 0,
|
||||
"openMenu": null,
|
||||
"previousSelectedElementIds": Object {},
|
||||
"previousSelectedElementIds": Object {
|
||||
"id0": true,
|
||||
},
|
||||
"resizingElement": null,
|
||||
"scrollX": 0,
|
||||
"scrollY": 0,
|
||||
|
@ -18575,7 +18577,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18588,9 +18590,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1116226695,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -18604,7 +18606,7 @@ Object {
|
|||
"id5",
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18617,9 +18619,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 4,
|
||||
"versionNonce": 400692809,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -18633,7 +18635,7 @@ Object {
|
|||
"id5",
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id2",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18646,9 +18648,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 4,
|
||||
"versionNonce": 1604849351,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -18684,7 +18686,7 @@ Object {
|
|||
"boundElementIds": null,
|
||||
"fillStyle": "hachure",
|
||||
"groupIds": Array [],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18697,9 +18699,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 2,
|
||||
"versionNonce": 1278240551,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -18720,7 +18722,7 @@ Object {
|
|||
"boundElementIds": null,
|
||||
"fillStyle": "hachure",
|
||||
"groupIds": Array [],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18733,9 +18735,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 2,
|
||||
"versionNonce": 1278240551,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -18743,7 +18745,7 @@ Object {
|
|||
"boundElementIds": null,
|
||||
"fillStyle": "hachure",
|
||||
"groupIds": Array [],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18756,9 +18758,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 2,
|
||||
"versionNonce": 453191,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -18779,7 +18781,7 @@ Object {
|
|||
"boundElementIds": null,
|
||||
"fillStyle": "hachure",
|
||||
"groupIds": Array [],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18792,9 +18794,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 2,
|
||||
"versionNonce": 1278240551,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -18802,7 +18804,7 @@ Object {
|
|||
"boundElementIds": null,
|
||||
"fillStyle": "hachure",
|
||||
"groupIds": Array [],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18815,9 +18817,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 2,
|
||||
"versionNonce": 453191,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -18825,7 +18827,7 @@ Object {
|
|||
"boundElementIds": null,
|
||||
"fillStyle": "hachure",
|
||||
"groupIds": Array [],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id2",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18838,9 +18840,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 2,
|
||||
"versionNonce": 2019559783,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -18865,7 +18867,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18878,9 +18880,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1150084233,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -18890,7 +18892,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18903,9 +18905,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1116226695,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -18915,7 +18917,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id2",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18928,9 +18930,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1014066025,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -18955,7 +18957,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18968,9 +18970,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1150084233,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -18980,7 +18982,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -18993,9 +18995,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1116226695,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -19005,7 +19007,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id2",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19018,9 +19020,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1014066025,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -19045,7 +19047,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19058,9 +19060,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1116226695,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -19071,7 +19073,7 @@ Object {
|
|||
"id5",
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19084,9 +19086,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 4,
|
||||
"versionNonce": 400692809,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -19097,7 +19099,7 @@ Object {
|
|||
"id5",
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id2",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19110,9 +19112,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 4,
|
||||
"versionNonce": 1604849351,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -19138,7 +19140,7 @@ Object {
|
|||
"groupIds": Array [
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id1",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19151,9 +19153,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 3,
|
||||
"versionNonce": 1116226695,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 100,
|
||||
"y": 100,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -19164,7 +19166,7 @@ Object {
|
|||
"id5",
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id0",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19177,9 +19179,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 4,
|
||||
"versionNonce": 400692809,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
},
|
||||
Object {
|
||||
"angle": 0,
|
||||
|
@ -19190,7 +19192,7 @@ Object {
|
|||
"id5",
|
||||
"id3",
|
||||
],
|
||||
"height": 10,
|
||||
"height": 50,
|
||||
"id": "id2",
|
||||
"isDeleted": false,
|
||||
"opacity": 100,
|
||||
|
@ -19203,9 +19205,9 @@ Object {
|
|||
"type": "rectangle",
|
||||
"version": 4,
|
||||
"versionNonce": 1604849351,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
"width": 50,
|
||||
"x": 200,
|
||||
"y": 200,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -19215,7 +19217,7 @@ Object {
|
|||
|
||||
exports[`regression tests supports nested groups: [end of test] number of elements 1`] = `3`;
|
||||
|
||||
exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `29`;
|
||||
exports[`regression tests supports nested groups: [end of test] number of renders 1`] = `28`;
|
||||
|
||||
exports[`regression tests switches from group of selected elements to another element on pointer down: [end of test] appState 1`] = `
|
||||
Object {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue