3794 Commits

Author SHA1 Message Date
Márk Tolmács
99a4428f6e
Merge branch 'master' into mtolmacs/feat/precise-hitboxes 2025-05-22 14:05:05 +02:00
Mark Tolmacs
8cc8367335
Fix deduplication
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-22 14:02:14 +02:00
Mark Tolmacs
5081abdde1
fix: Sort was incorrectly called
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-22 13:57:01 +02:00
Mark Tolmacs
9c04e22897
Use module-level cache
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-22 13:49:16 +02:00
Mark Tolmacs
68cb5056ac
Defensive programming update
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-22 13:38:02 +02:00
Marcel Mraz
41c036e1a5
chore: Add DeepWiki badge (#9559) 2025-05-22 13:05:56 +02:00
Márk Tolmács
91d36e9b81
fix: Linear to elbow conversion crash (#9556)
* Fix linear to elbow conversion

* Add invariant check

* Add dev invariant fix

* Add arrowhead
2025-05-22 12:34:15 +02:00
Kamil Wąż
27522110df
fix: fix keybindings for arrowheads (#9557) 2025-05-22 09:47:41 +02:00
Ryan Di
712f267519
feat: better unlock (#9546)
* change lock label

* feat: add unlock logic for single units on pointer up

* feat: add unlock popup

* fix: linting errors

* style: padding tweaks

* style: remove redundant line

* feat: lock multiple units together

* style: tweak color & position

* feat: add highlight for locked elements

* feat: select groups correctly after unlocking

* test: update snapshots

* fix: lasso from selecting locked elements

* fix: should prevent selecting unlocked elements and setting locked id at the same time

* fix: reset hit locked id immediately when appropriate

* feat: capture locked units in delta

* test: update locking test

* feat: show lock highlight when locking (including undo/redo)

* feat: make locked highlighting consistent

* feat: show correct cursor type when moving over locked elements

* fix history

* remove `lockedUnits.singleUnits`

* tweak button

* do not render UnlockPopup if not locked element selected

* tweak actions

* refactor: simplify type

* refactor: rename type

* refactor: simplify hit element setting & checking

* fix: prefer locked over link

* rename to `activeLockedId`

* refactor: getElementAtPosition takes an optional hitelments array

* fix: avoid setting active locked id after resizing

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-05-21 21:57:12 +10:00
Márk Tolmács
2e61d46cbd
Merge branch 'master' into mtolmacs/feat/precise-hitboxes 2025-05-20 09:26:45 +02:00
Márk Tolmács
41a7613dff
fix: Elbow arrow conversion labels mixed up (#9547) 2025-05-19 20:35:48 +02:00
Mark Tolmacs
18c21593e6
Add caching
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 21:41:54 +02:00
Mark Tolmacs
bcdcb21971
Refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 20:23:53 +02:00
Mark Tolmacs
624b9927cd
Remove more of the safety clamps
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 20:02:19 +02:00
Mark Tolmacs
aa758fa6d6
Small refactors
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 19:59:03 +02:00
Mark Tolmacs
9801b9a12f
Fix quarter snap
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 19:47:28 +02:00
Mark Tolmacs
946c366a1c
Fix test for lassoes
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 10:03:13 +02:00
Mark Tolmacs
8b248eda94
Refactor eraser and lasso hit tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-18 10:02:06 +02:00
Márk Tolmács
49613ad0c3
Merge branch 'master' into mtolmacs/feat/precise-hitboxes 2025-05-17 15:09:35 +02:00
Mark Tolmacs
da9cda14d6
Revert "State"
This reverts commit 4ba1bdaead0d74afea3c151efedeb59dfddf24de.
2025-05-15 18:30:18 +02:00
Mark Tolmacs
4ba1bdaead
State 2025-05-15 18:20:47 +02:00
Mark Tolmacs
a9e8c7577b
Do not connect in outer zoom levels 2025-05-15 13:40:50 +02:00
Mark Tolmacs
103f036734
Simplify maxGap and binding 2025-05-15 13:40:03 +02:00
David Luzar
95d89a751a
refactor: decouple radio button selection from .buttonList wrapper (#9528)
* refactor: decouple radio button selection from `.buttonList`

* fix
2025-05-15 13:22:26 +02:00
Mark Tolmacs
9c0a81d42c
Fix circular reference 2025-05-15 12:53:44 +02:00
Mark Tolmacs
6c59c5eefb
Fix lint 2025-05-14 21:40:27 +02:00
Mark Tolmacs
70c447059f
Fix tests 2025-05-14 21:36:16 +02:00
Mark Tolmacs
74b512a605
Fix no roundness collision shapes 2025-05-14 21:36:16 +02:00
Mark Tolmacs
8a808b6e91
Rectangle 2025-05-14 21:36:16 +02:00
Mark Tolmacs
e25441c8f8
Diamond collision 2025-05-14 21:36:16 +02:00
Mark Tolmacs
47f12a4d85
Refactor 2025-05-14 21:36:16 +02:00
Mark Tolmacs
13bd8cad96
Restore original 2025-05-14 21:36:16 +02:00
Mark Tolmacs
47cb16822c
Fix snapping distance at mid points 2025-05-14 21:36:16 +02:00
Mark Tolmacs
59a986cb41
Fix tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:36:16 +02:00
Mark Tolmacs
2e6d0ecb65
Fix tests
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:36:16 +02:00
Mark Tolmacs
d08414c2a9
Inverted polygon now works just as well for hit testing
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:36:16 +02:00
Mark Tolmacs
e1b81480ac
[skip ci] inverted polygon hit test
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:35:52 +02:00
Mark Tolmacs
3b037a7d82
Fixing tests 2025-05-14 21:35:52 +02:00
Mark Tolmacs
65cecf041a
Fix condition where linear and freedraw cannot be unselected 2025-05-14 21:35:52 +02:00
Mark Tolmacs
8157b570db
Linear distance calc
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:35:52 +02:00
Mark Tolmacs
814520b1f0
Refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:35:52 +02:00
Mark Tolmacs
9203c99eec
Use roughjs to generate the line and freedraw shapes for collision 2025-05-14 21:35:52 +02:00
Mark Tolmacs
52205031ab
Fast fail path for hit testing
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:35:52 +02:00
Mark Tolmacs
04e1bf0bc4
Precise hit testing
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2025-05-14 21:35:52 +02:00
Marcel Mraz
6b5fb30d69
fix: unify line height across default fonts (#9513) 2025-05-14 16:02:01 +02:00
Marcel Mraz
d92a849038
fix: issues when importing package outside of browser (#9525) 2025-05-14 16:01:43 +02:00
David Luzar
0a534f1bc6
fix: never show snap lines when lasso tool active (#9523) 2025-05-14 22:04:40 +10:00
Ryan Di
4ca5f53b1f
fix: alt + ctrl lasso selected elements not always kept (#9522)
* fix: alt + ctrl lasso selected elements not always kept

* Update packages/excalidraw/components/App.tsx

---------

Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
2025-05-14 22:04:03 +10:00
zsviczian
f7dcc893ea
feat: transparent link background, scale link icon when zooming to below 100% (#9520)
* Do not set link background color, dynamically scale down link icon size with zoom.

* removed unnecessary change

* use canvas bg color & reduce size and stroke width

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-05-14 13:38:18 +02:00
zsviczian
4dfb8a3f8e
feat: allow forms.microsoft.com domain for embeddables (#9519)
* Update embeddable.ts

* no need for same origin

* The form does not load without allow same origin

* automatically add embed=true to link if not present

* fix link check
2025-05-13 19:48:26 +02:00