Commit Graph

425 Commits

Author SHA1 Message Date
Aakansha Doshi 2ff0528a4f Merge remote-tracking branch 'origin/master' into aakansha-create-text-containers-programmatically 2023-07-14 17:10:09 +05:30
Christopher Chedeau b33fa6d6f6 fix: stronger enforcement of normalizeLink (#6728)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-06-29 12:14:42 +02:00
Aakansha Doshi 6d56634289 fix: do not bind text to container using text tool when it has text already (#6694)
* fix: do not bind text to container using text tool when it has text already

* Update src/element/textWysiwyg.test.tsx
2023-06-19 17:28:45 +05:30
Aakansha Doshi 7f7128ec09 fix: don't allow binding text to images (#6693) 2023-06-19 13:47:28 +05:30
Ryan Di 81ebf82979 feat: introduce frames (#6123)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-06-14 18:42:01 +02:00
Alex Kim b4abfad638 fix: bound arrows not updated when rotating multiple elements (#6662) 2023-06-09 13:22:40 +02:00
David Luzar 84bd9bd4ff fix: creating text while color picker open (#6651)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-06-06 22:04:06 +02:00
Aakansha Doshi ae7ff76126 fix: cleanup textWysiwyg and getAdjustedDimensions (#6520)
* fix: cleanup textWysiwyg and getAdjustedDimensions

* fix lint

* fix test
2023-06-06 14:36:18 +05:30
Aakansha Doshi d9e6910df0 Merge remote-tracking branch 'origin/master' into aakansha-create-text-containers-programmatically 2023-06-05 11:46:26 +05:30
Alex Kim 6459ccda6a feat: add flipping for multiple elements (#5578)
* feat: add flipping when resizing multiple elements

* fix: image elements not flipping its content

* test: fix accidental resizing in grouping test

* fix: angles not flipping vertically when resizing

* feat: add flipping multiple elements with a command

* revert: image elements not flipping its content

This reverts commit cb989a6c66e62a02a8c04ce41f12507806c8d0a0.

* fix: add special cases for flipping text & images

* fix: a few corner cases for flipping

* fix: remove angle flip

* fix: bound text scaling when resizing

* fix: linear elements drifting away after multiple flips

* revert: fix linear elements drifting away after multiple flips

This reverts commit bffc33dd3f.

* fix: linear elements unstable bounds

* revert: linear elements unstable bounds

This reverts commit 22ae9b02c4.

* fix: hand-drawn lines shift after flipping

* test: fix flipping tests

* test: fix the number of context menu items

* fix: incorrect scaling due to ignoring bound text when finding selection bounds

* fix: bound text coordinates not being updated

* fix: lines bound text rotation

* fix: incorrect placement of bound lines on flip

* remove redundant predicates in actionFlip

* update test

* refactor resizeElement with some renaming and comments

* fix grouped bounded text elements not being flipped correctly

* combine mutation for bounded text element

* remove incorrect return

* fix: linear elements bindings after flipping

* revert: remove incorrect return

This reverts commit e6b205ca90.

* fix: minimum size for all elements in selection

---------

Co-authored-by: Ryan Di <ryan.weihao.di@gmail.com>
2023-05-25 16:27:41 +02:00
Aakansha Doshi b72515a83b fix lint 2023-05-25 14:20:14 +05:30
Aakansha Doshi 1c291f8b3d fix single text element, unique id and tests 2023-05-25 14:12:01 +05:30
Aakansha Doshi 6c41e507db fix singular elements 2023-05-24 22:35:51 +05:30
Aakansha Doshi 985318e960 support ids, clean up code and move the api related stuff to transform.ts 2023-05-24 17:12:26 +05:30
Aakansha Doshi da8e97ad14 preserve bindings for labelled arrows 2023-05-23 16:55:41 +05:30
Aakansha Doshi f113a393e6 preserve bindings if present and fix testcases 2023-05-23 16:47:52 +05:30
Aakansha Doshi d8c901e0c1 support arrow bindings via start and end in api 2023-05-22 21:22:36 +05:30
Aakansha Doshi 5bfe4dff5f fix lint 2023-05-22 13:57:05 +05:30
Aakansha Doshi dcf9e27e51 Merge remote-tracking branch 'origin/master' into aakansha-create-text-containers-programmatically 2023-05-22 13:51:36 +05:30
Aakansha Doshi e3fa2905f2 fix tests 2023-05-22 13:40:35 +05:30
Barnabás Molnár 5b7596582f feat: color picker redesign (#6216)
Co-authored-by: Maielo <maielo.mv@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-05-18 16:06:27 +02:00
Aakansha Doshi e68edb9f73 keep element as is unless we support prog api 2023-05-18 15:20:26 +05:30
Aakansha Doshi 4348646705 better types 2023-05-17 17:58:18 +05:30
Aakansha Doshi 81bee8acb8 fix alignment 2023-05-17 14:09:25 +05:30
Aakansha Doshi a443d65512 support labelled arrows 2023-05-16 17:49:24 +05:30
Aakansha Doshi fbf2d533c0 support creating arrows and line 2023-05-16 16:50:58 +05:30
Aakansha Doshi 32aaa8b95d fix api and support individual shapes and text element 2023-05-15 16:34:12 +05:30
Aakansha Doshi e0f2869374 fix: assign the original text to text editor only during init (#6580) 2023-05-13 19:17:29 +02:00
Aakansha Doshi acde193a64 Merge remote-tracking branch 'origin/master' into aakansha-create-text-containers-programmatically 2023-05-12 17:19:45 +05:30
Aakansha Doshi bc5c58282f update api to use label 2023-05-12 17:19:36 +05:30
David Luzar 560231d365 perf: use UIAppState where possible to reduce UI rerenders (#6560) 2023-05-08 10:14:02 +02:00
Aakansha Doshi 9c63b0124c fix 2023-05-03 14:34:06 +05:30
Aakansha Doshi 59e8bf498d fix 2023-05-03 13:41:41 +05:30
Aakansha Doshi 7087db42c0 fix 2023-05-03 00:48:11 +05:30
Aakansha Doshi 15b5295baf feat: support creating text containers programatically 2023-05-02 22:11:35 +05:30
Aakansha Doshi da8dd389a9 fix: cleanup getMaxContainerHeight and getMaxContainerWidth (#6519)
* fix: cleanup getMaxContainerHeight and getMaxContainerWidth

* rename getMaxContainerWidth -> getBoundTextMaxMaxWidth and getMaxContainerHeight -> getBoundTextMaxHeight

* add specs
2023-04-25 18:06:23 +05:30
Aakansha Doshi dae81c0a2c fix: cleanup redrawTextBoundingBox (#6518)
* chore: cleanup redrawTextBoundingBox

* fix
2023-04-25 17:57:53 +05:30
David Luzar d35386755f feat: retain seed on shift-paste (#6509)
thanks for the review 👍
2023-04-24 10:26:21 +02:00
siddhant 851b9b7aec fix: rotate the text element when binding to a rotated container (#6477)
* Updated logic to update the bound child angle from the parent

* update angle when generating text element

* add test

* remove

* fix

---------

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-04-20 16:34:39 +05:30
Aakansha Doshi 5ddb28d378 fix: support breaking words containing hyphen - (#6014)
* fix: support breaking words containing hyphen -

* fix

* add spec

* fix

* fix

* fix

* fix and add spec

* improve code and add more tests
2023-04-20 11:10:46 +05:30
Aakansha Doshi 979312f779 fix: center align text when wrapped in container via context menu (#6480)
* rename action to wrapTextInContainer

* fix: center align text when wrapped in container via context menu

* revert translation key

* fix tests
2023-04-18 19:44:14 +05:30
Aakansha Doshi 21726e22cc fix: mark more props as optional for element (#6448)
* fix: mark more props as optional for element

* fix
2023-04-18 18:42:48 +05:30
David Luzar f640ddc2aa fix: incorrectly duplicating items on paste/library insert (#6467
* fix: incorrectly duplicating items on paste/library insert

* fix: deduplicate element ids on restore

* tests
2023-04-16 17:22:16 +02:00
David Luzar 399c92d882 fix: utils leaking Scene state (#6461
* fix: utils leaking Scene state

* remove debug

* doc

* add tests for group duplicating

* tweaks
2023-04-16 11:56:25 +02:00
Bear 6164b5273c fix: center align text when bind to container via context menu (#6451) 2023-04-14 15:22:39 +02:00
Aakansha Doshi 13b27afe0f fix: update coords when text unbinded from its container (#6445)
* fix: update coords when text unbinded from its container

* Add specs
2023-04-13 11:45:58 +05:30
David Luzar e4d8ba226f feat: zigzag fill easter egg (#6439) 2023-04-10 15:38:50 +02:00
Aakansha Doshi ec215362a1 fix: introduce baseline to fix the layout shift when switching to text editor (#6397)
* fix: introduce baseline to fix the layout shift when switching to text editor

* uncomment

* change offset to 8pixels

* [debug]

* introduce DOM baseline in canvas rendering instead

* introduce baseline in element making it backward compat

* fix

* lint

* fix

* update baseline when resizing text element

* fix safari backward compat

* fix for safari

* lint

* reduce safari LS

* floor line height and height when dom height increases than canvas height

* Revert "floor line height and height when dom height increases than canvas height"

This reverts commit 8de6516823.

* cleanup

* use DOM height only for safari to fix LS

* Revert "use DOM height only for safari to fix LS"

This reverts commit d75889238d.

* fix lint and test

* fix

* calculate line height by rounding off instead of DOM

* cleanup

---------

Co-authored-by: dwelle <luzar.david@gmail.com>
2023-04-10 18:52:46 +05:30
Aakansha Doshi 0b8fc4f4b6 fix: don't refresh dimensions for deleted text elements (#6438) 2023-04-10 16:31:58 +05:30
Aakansha Doshi d61b3cf83d fix: don't jump text to end when out of viewport in safari (#6416) 2023-04-05 12:17:18 +05:30