mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Don't add midpoint until dragged beyond a threshold (#5927)
* Don't add midpoint until dragged beyond a threshold * remove unnecessary code * fix tests * fix * add spec * remove isMidpoint * cleanup * fix threshold for zoom * split into shouldAddMidpoint and addMidpoint * wrap in flushSync for synchronous updates * remove threshold for line editor and add spec * [unrelated] fix stack overflow state update * fix tests * don't drag arrow when dragging to add mid point * add specs Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
baf9651d34
commit
25c6056b03
5 changed files with 258 additions and 63 deletions
|
@ -10989,7 +10989,13 @@ Object {
|
|||
"lastUncommittedPoint": null,
|
||||
"pointerDownState": Object {
|
||||
"lastClickedPoint": -1,
|
||||
"origin": null,
|
||||
"prevSelectedPointsIndices": null,
|
||||
"segmentMidpoint": Object {
|
||||
"added": false,
|
||||
"index": null,
|
||||
"value": null,
|
||||
},
|
||||
},
|
||||
"pointerOffset": Object {
|
||||
"x": 0,
|
||||
|
@ -11216,7 +11222,13 @@ Object {
|
|||
"lastUncommittedPoint": null,
|
||||
"pointerDownState": Object {
|
||||
"lastClickedPoint": -1,
|
||||
"origin": null,
|
||||
"prevSelectedPointsIndices": null,
|
||||
"segmentMidpoint": Object {
|
||||
"added": false,
|
||||
"index": null,
|
||||
"value": null,
|
||||
},
|
||||
},
|
||||
"pointerOffset": Object {
|
||||
"x": 0,
|
||||
|
@ -11671,7 +11683,13 @@ Object {
|
|||
"lastUncommittedPoint": null,
|
||||
"pointerDownState": Object {
|
||||
"lastClickedPoint": -1,
|
||||
"origin": null,
|
||||
"prevSelectedPointsIndices": null,
|
||||
"segmentMidpoint": Object {
|
||||
"added": false,
|
||||
"index": null,
|
||||
"value": null,
|
||||
},
|
||||
},
|
||||
"pointerOffset": Object {
|
||||
"x": 0,
|
||||
|
@ -12078,7 +12096,13 @@ Object {
|
|||
"lastUncommittedPoint": null,
|
||||
"pointerDownState": Object {
|
||||
"lastClickedPoint": -1,
|
||||
"origin": null,
|
||||
"prevSelectedPointsIndices": null,
|
||||
"segmentMidpoint": Object {
|
||||
"added": false,
|
||||
"index": null,
|
||||
"value": null,
|
||||
},
|
||||
},
|
||||
"pointerOffset": Object {
|
||||
"x": 0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue