Make the Path tool support multi-point conversion between smooth/sharp on double-click (#2498)

* kinda works

* solved merge conflicts

* implement the multi flip

* nit-picks

* removed extra functions

* Fix inputs not being passed to backend for repeated double-clicks

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0SlowPoke0
2025-05-20 10:41:38 +05:30
committed by GitHub
parent 9236bfcec0
commit ddb2d744d4
4 changed files with 63 additions and 36 deletions

View File

@@ -212,7 +212,7 @@ export function createInputManager(editor: Editor, dialog: DialogState, portfoli
if (textToolInteractiveInputElement) return;
// Allow only double-clicks
if (e.detail !== 2) return;
if (e.detail % 2 == 1) return;
// `e.buttons` is always 0 in the `mouseup` event, so we have to convert from `e.button` instead
let buttons = 1;