WebSVG / voronoi

Parametric Voronoi generator with real time editing and SVG export
https://voronoi-editor.web.app
179 stars 27 forks source link

Fix seeds weren't generated or displayed in top left corner of path #23

Closed thenickdude closed 2 years ago

thenickdude commented 2 years ago

Seeds were never generated or displayed in the top left side of a loaded path SVG, because there were mismatches between the viewport coordinates needed by inside_id's call to elementByPoint, and the SVG-relative coordinates needed by the rest of the app. This meant that unless there was no padding at all on the webpage, coordinates got shifted.

Fixes #11

Before, with old code:

Screen Shot 2022-08-08 at 5 47 45 PM

After fix:

Screen Shot 2022-08-08 at 5 47 14 PM

wassfila commented 2 years ago

@thenickdude , thanks a lot for your contribution, it's been quite some time since I dived into the code, and I remember I abandoned this bug but you really cracked it and found the issue, thanks for your help. I tested with the issue reference data and it looks fine to me. Also the shift with the parent coordinates makes sense, I did not think of that.

Before the fix

image

With the fix

image
wassfila commented 2 years ago

updated both deployed instances with new version v10.08.2022 github automatic by push : https://websvg.github.io/voronoi/ firebase with command line install, login, deploy : https://voronoi-editor.web.app/

thenickdude commented 2 years ago

PXL_20220811_014713022

Thanks for the software BTW, I was able to use it to design a cool looking and functional hard drive rack for myself!

wassfila commented 2 years ago

Thanks for the software BTW, I was able to use it to design a cool looking and functional hard drive rack for myself!

Awesome, glad you liked the SW and thanks for sharing, cool photo.