bumbu/svg-pan-zoom

Destroy does not reset element to its origins

Open

#171 opened on Dec 9, 2015

View on GitHub
 (9 comments) (0 reactions) (0 assignees)JavaScript (1,585 stars) (383 forks)batch import
bughelp wanted

Description

I have the case where I initialize and destroy an SVG Element based on its visibility and experienced, that the wrapping g with its transform="matrix(...);" attribute is not reset after destroying it. When then re-initializing the object, it will show the SVG at a veeery small scale as a starting point. Because the translation is then applied on top of the already existing matrix.

I tried to just remove the transform attribute by hand but that didn't produce my wanted result.

Any suggestions?

Contributor guide