eclipse-sprotty / sprotty

A diagramming framework for the web
https://sprotty.org/
Eclipse Public License 2.0
731 stars 83 forks source link

Zoom limits are not optional #441

Open NiklasRentzCAU opened 9 months ago

NiklasRentzCAU commented 9 months ago

The zoom limits, as introduced in #356, force the configuration of some zoom limit, just overriding the zoom limits in the viewer options to zoomLimits: undefined will cause an error when zooming:

zoom.js:72 Uncaught TypeError: Cannot read properties of undefined (reading 'min')
    at ZoomMouseListener.processZoom (zoom.js:72:1)

We have a use case (the new top-down layout in ELK) that makes it sensible to zoom arbitrarily deep into hierarchical graphs, so no limit number can turn this off. I would propose that setting this option to undefined or the limit numbers to something like -1 causes the limits to be ignored entirely.