dikalo / lienzo-core

Lienzo Structure Graphics GWT Toolkit
Apache License 2.0
51 stars 58 forks source link

Multipath disapears after resize #177 #208

Closed danielzhe closed 6 years ago

danielzhe commented 6 years ago

I made some changes to prevent the recalculate of wpc and hpc for every point in every resize, because it can lead to division by zero if bounding box have 0 width or height. My approach was to calculate the relative position of the point (proportion of displacement of the point based on topLeft) and reuse that proportion for calculate the new position of the points in resize instead to make this calc every time using the current size of bounding box.

SprocketNYC commented 6 years ago

Thanks !!! I'll let you know when I publish a new build.