Aakansha Doshi 0d1058a596
feat: support segment midpoints in line editor (#5641)
* feat: support segment midpoints in line editor

* fix tests

* midpoints working in bezier curve

* midpoint working with non zero roughness

* calculate beizer curve control points for points >2

* unnecessary rerender

* don't show phantom points inside editor for short segments

* don't show phantom points for small curves

* improve the algo for plotting midpoints on bezier curve by taking arc lengths and doing binary search

* fix tests finally

* fix naming

* cache editor midpoints

* clear midpoint cache when undo

* fix caching

* calculate index properly when not all segments have midpoints

* make sure correct element version is fetched from cache

* chore

* fix

* direct comparison for equal points

* create arePointsEqual util

* upate name

* don't update cache except inside getter

* don't compute midpoints outside editor unless 2pointer lines

* update cache to object and burst when Zoom updated as well

* early return if midpoints not present outside editor

* don't early return

* cleanup

* Add specs

* fix
2022-09-14 19:55:54 +05:30
..
2021-10-21 22:05:48 +02:00
2022-07-22 11:20:36 +05:30
2022-04-07 13:43:29 +02:00
2022-03-11 19:53:42 +05:30
2022-07-22 11:20:36 +05:30
2021-10-21 22:05:48 +02:00
2021-10-21 22:05:48 +02:00
2022-08-22 17:18:25 +05:30
2022-02-03 20:34:59 +05:30