excalidraw/src/element
Aakansha Doshi 83383977f5
feat: add line height attribute to text element (#6360)
* feat: add line height attribute to text element

* lint

* update line height when redrawing text bounding box

* fix tests

* retain line height when pasting styles

* fix test

* create a util for calculating ling height using old algo

* update line height when resizing multiple text elements

* make line height backward compatible

* udpate line height for older element when font size updated

* remove logs

* Add specs

* lint

* review fixes

* simplify by changing `lineHeight` from px to unitless

* make param non-optional

* update comment

* fix: jumping text due to font size being calculated incorrectly

* update line height when font family is updated

* lint

* Add spec

* more specs

* rename to getDefaultLineHeight

* fix getting lineHeight for potentially undefined fontFamily

* reduce duplication

* fix fallback

* refactor and comment tweaks

* fix

---------

Co-authored-by: dwelle <luzar.david@gmail.com>
2023-03-22 11:32:38 +05:30
..
binding.ts feat: Support labels for arrow 🔥 (#5723) 2022-12-05 21:03:13 +05:30
bounds.test.ts feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
bounds.ts fix: move utility types out of .d.ts file to fix exported declaration files (#6315) 2023-03-04 19:21:57 +01:00
collision.ts fix: division by zero in findFocusPointForEllipse leads to infinite loop in wrapText freezing Excalidraw (#6377) 2023-03-20 17:50:09 +05:30
dragElements.ts fix: disable locking aspect ratio for box-selection (#5525) 2022-08-02 19:10:17 +05:30
Hyperlink.scss feat: Support hyperlinks 🔥 (#4620) 2022-02-03 20:34:59 +05:30
Hyperlink.tsx fix: stale appState of MainMenu defaultItems rendered from Actions (#6074) 2023-01-06 14:32:55 +01:00
image.ts fix: ensure svg image dimensions are always set (#5044) 2022-04-15 12:05:10 +02:00
index.ts fix: restore text dimensions (#5432) 2022-10-28 23:31:56 +02:00
linearElementEditor.ts fix: move utility types out of .d.ts file to fix exported declaration files (#6315) 2023-03-04 19:21:57 +01:00
mutateElement.ts fix: move utility types out of .d.ts file to fix exported declaration files (#6315) 2023-03-04 19:21:57 +01:00
newElement.test.ts feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
newElement.ts feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30
resizeElements.ts feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30
resizeTest.ts feat: Support labels for arrow 🔥 (#5723) 2022-12-05 21:03:13 +05:30
showSelectedShapeActions.ts feat: add hand/panning tool (#6141) 2023-01-23 16:12:28 +01:00
sizeHelpers.test.ts fix: remove rounding to fix jitter when shift-editing (#5543) 2022-08-05 20:22:46 +05:30
sizeHelpers.ts fix: remove rounding to fix jitter when shift-editing (#5543) 2022-08-05 20:22:46 +05:30
sortElements.test.ts fix: sort bound text elements to fix text duplication z-index error (#5130) 2023-02-02 16:23:39 +08:00
sortElements.ts fix: sort bound text elements to fix text duplication z-index error (#5130) 2023-02-02 16:23:39 +08:00
textElement.test.ts feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30
textElement.ts feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30
textWysiwyg.test.tsx feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30
textWysiwyg.tsx feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30
transformHandles.ts feat: Support labels for arrow 🔥 (#5723) 2022-12-05 21:03:13 +05:30
typeChecks.test.ts fix: consider arrow for bound text element (#6297) 2023-02-28 19:53:30 +05:30
typeChecks.ts fix: move utility types out of .d.ts file to fix exported declaration files (#6315) 2023-03-04 19:21:57 +01:00
types.ts feat: add line height attribute to text element (#6360) 2023-03-22 11:32:38 +05:30