bumbu/svg-pan-zoom
View on GitHubminZoom and maxZoom not updated when updateBBox( ) is called
Open
#267 opened on Oct 26, 2017
bughelp wanted
Description
Expected behaviour
When adding new elements to the SVG that fall outside the current BBox, and calling updateBBox(), i should be able to zoom out to see those elements
Actual behaviour
The amount that I can zoom out is still based on the original BBox, meaning that i may not be able to zoom out to see all elements, even if minZoom is <1
Steps to reproduce the behaviour
- activate the lib on an SVG with
minZoom: 1 - add elements outside the SVG's outer edge
- call
updateBBox() - try to zoom out to see the new elements
Note: Although it feels a bit weird to have them diverge, I'm not sure that the maximum zoom level should be affected by removing elements in the same way -- it would feel kinda strange to not be able to zoom into existing elements just because new ones have been added