Files
excalidraw/src/components
Aakansha Doshi 9659254fd6 feat: improve text measurements in bound containers (#6187)
* 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
2023-02-23 16:33:10 +05:30
..
2023-01-29 14:22:25 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2023-01-12 13:06:00 +01:00
2021-10-21 22:05:48 +02:00
2022-07-22 11:20:36 +05:30
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2023-01-23 16:12:28 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-07-22 11:20:36 +05:30
2022-11-01 17:29:58 +01:00
2021-10-21 22:05:48 +02:00
2021-10-21 22:05:48 +02:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-11-01 17:29:58 +01:00
2022-02-03 20:34:59 +05:30