bpmn-visualization-js icon indicating copy to clipboard operation
bpmn-visualization-js copied to clipboard

[FEAT] Set zoom in / zoom out max values

Open NathalieC opened this issue 4 years ago • 2 comments

At some point (exists in mxGraph?), a max zoom in and out levels are reached. Possible solutions to be discussed

  • Max zoom out should be reached when the diagram fit the viewport.
  • Max zoom in should be one element fitting the viewport (task / event). This is very big, but this can really help visually impaired people.

Interactions with other features

Please keep in minds the following features when implementing this one

  • Zoom events: #1488
  • interaction with the zoom API #1487: when values reached, send events only (remember throttle/debounce)

NathalieC avatar Oct 12 '20 07:10 NathalieC

This feature may force us to deal with mxgraph minFitScale and maxFitScale to ensure we have the same constraints for zoom and fit. See https://github.com/jgraph/mxgraph/blob/v4.2.0/javascript/src/js/view/mxGraph.js#L1571-L1585 Zoom scale constraints also exist by default for zoom triggered by pinched gestures (https://github.com/jgraph/mxgraph/blob/v4.2.2/javascript/src/js/handler/mxPanningHandler.js#L434)

tbouffard avatar Oct 22 '20 21:10 tbouffard

The lib must manage something on its side as the integration has no way to ensure this when the user is doing zoom with the mouse wheel. This feature was temporarily available during development of #791. Reverted with 814fda6 (#791) and 185acd9 (#791)

tbouffard avatar Nov 03 '20 10:11 tbouffard