charactercreator
charactercreator copied to clipboard
Zoom on item when it gets click/Auto viewBox on thumbnails
Can we get SVG coordinates with element.getBoundingClientRect() ?
This requires a function that calculates the position of an item within the SVG viewBox. With that info we can pass it to the zoom function and zoom specifically to the item (allow some padding). That function can also be reused to properly frame items in the item selection menu on the right, so we don't have to manually set the viewBox on them in a dict (what a pain in the...)
I'm still working on this one.