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)
Binding code refactor
Added centered focus point
Binding & focus point debug
Add invariants to check binding integrity in elements
Binding fixes
Small refactors
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Fix point click array creation interaction with fixed point binding
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Restrict new behavior to arrows only
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Allow binding inside images
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Fix already existing fixed binding retention
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Refactor and implement fixed point binding for unfilled elements
Change bind mode timeout logic
Fix tests
Add Alt bindMode switch
No dragging of arrows when bound, similar to elbow
Fix timeout not taking effect immediately
Bumop z-index for arrows when dragged
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Fix binding
Remove unneeded params
Unfinished simple arrow avoidance
Fix newly created jumping arrow when gets outside
Do not apply the jumping logic to elbow arrows for new elements
Existing arrows now jump out
Type updates to support fixed binding for simple arrows
Fix crash for elbow arrws in mutateElement()
Refactored simple arrow creation
Updating tests
No confirm threshold when inside biding range
Fix multi-point arrow grid off
Make elbow arrows respect grids
Unbind arrow if bound and moved at shaft of arrow key
Fix binding test
Fix drag unbind when the bound element is in the selection
Do not move mid point for simple arrows bound on both ends
Add test for mobing mid points for simple arrows when bound on the same element on both ends
Fix linear editor bug when both midpoint and endpoint is moved
Fix all point multipoint arrow highlight and binding
* fix: awkward point adding and removing on touch device
* feat: move finalize to next to last point
* feat: on touch screen, click would create a default line/arrow
* fix: make default adaptive to zoom
* fix: increase padding to avoid cutoffs
* refactor: simplify
* fix: only use bigger padding when needed
* center arrow horizontally on pointer
* increase min drag distance before we start 2-point-arrow-drag-creating
* do not render 0-width arrow while creating
* dead code
* fix tests
* fix: remove redundant code
* do not enter line editor on creation
---------
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* fix: set cursor to auto when not hovering a point on linear element #9628
* Simplify hover test for cursor
* Add back comment
* Fix test for hit testing
---------
Co-authored-by: Mark Tolmacs <mark@lazycat.hu>