* fix(getDefaultLineHeight): make getDefaultLineHeight always has a default value
* test: add getDefaultLineHeight test case when using unknown font
* test: add getDefaultLineHeight test case when using unknown font
* Revert "test: add getDefaultLineHeight test case when using unknown font"
This reverts commit d41da5493b6edab9e599a13a23c387d38345bf03.
* test: add getDefaultLineHeight test case when using unknown font
* newline
* newline
* tweaks
* trigger action
* trigger action
* fix
---------
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
Revert "fix: use `ideographic` textBaseline to improve layout shift when editing text (#6384)"
This reverts commit 9e52c30ce86d7f7e61ffdb5ecad2523e179f620e.
* 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>
* fix: hide text align for labelled arrows
* lintttt
* since we fetch seledcted Elements including the bound text hence this block can be removed
* fix
* feat: move to canvas measureText
* calcualte height with better heuristic
* improve heuristic more
* remove vertical offset as its not needed
* lint
* calculate width of individual char and ceil to calculate width and remove adjustment factor
* push the word if equal to max width
* update height when text overflows for vertical alignment top/bottom
* remove the hack of updating height when line mismatch as its not needed
* remove scroll height and calculate the height instead
* remove unused code
* fix
* remove
* use math.ceil for whole width instead of individual chars
* fix tests
* fix
* fix
* redraw text bounding box instead when font loaded to fix alignment as well
* fix
* fix
* fix
* Add a 0.05px extra only for firefox
* Add spec
* stop taking ceil and increase firefox editor width by 0.05px
* Ad 0.05px in safari too
* lint
* lint
* remove baseline from measureFontSizeFromWH
* don't redraw on font load
* lint
* refactor name and signature
* fix: improve text wrapping inside rhombus
* Add comments
* specs
* fix: shift resize and multiple element regression for ellipse and rhombus
* use container width for scaling font size
* fix
* fix multiple resize
* lint
* redraw on submit
* redraw only newly pasted elements
* no padding when center
* fix tests
* fix
* dont add padding in rhombus when aligning
* refactor
* fix
* move getMaxContainerHeight and getMaxContainerWidth to textElement.ts
* Add specs
* feat: bind text to container when clicked on filled shape or element stroke
* Bind if double clicked on stroke as well
* remove
* specs
* remove
* shuffle
* fix
* back to normal
* fix: don't repair during reconcilation
* Add opts to restoreElement and enable refreshDimensions and repair via config
* remove
* update changelog
* fix tests
* rename to repairBindings