bumbu/svg-pan-zoom

minZoom and maxZoom not updated when updateBBox( ) is called

Open

#267 建立於 2017年10月26日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (1,585 star) (383 fork)batch import
bughelp wanted

描述

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

  1. activate the lib on an SVG with minZoom: 1
  2. add elements outside the SVG's outer edge
  3. call updateBBox()
  4. 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

貢獻者指南