Zoom constraints

When the zoom level is equal to 1, the manager content is adjusted to the bounds of the JSF view so as to be displayed entirely. Consequently, a zoom level of n means that the content is scaled by a factor of n . For example, a zoom factor of 2 means that the manager content is displayed double its size.
By default, the view is constrained by the manager content bounds. The direct consequences are that:
  • Pan actions or zoom interactions cannot go out of the manager content bounds.
  • The view zoom level cannot be lower than 1.
This constraint can be removed by setting the constrainedOnContents property to false .
The zoom level applied to the view by using the JavaScriptâ„¢ zoom interactor can be free or constrained to specified zoom levels. In the free zoom mode, the only constraints are the minimum and maximum zoom levels. The default value of the minimum zoom level is set to 1 and the default value of the maximum zoom level is set to 10. These constraints can be customized with the minZoomLevel and the maxZoomLevel properties respectively.
Note
By default, the minimum zoom level cannot be lower than 1.
To specify fixed zoom levels, use the zoomLevels property.
When this property is set:
  • The minZoomLevel and maxZoomLevel properties are ignored.
  • The minZoomLevel becomes the first zoom level and the maxZoomLevel the last zoom level in the list.
  • The zoom interactor fits to the nearest zoom level.
  • The built-in zoom actions on the JavaScript view proxy use these fixed zoom levels.
Fixed zoom levels must be used in order for a tiled view to be cached on the client-side.

JViews Diagrammer

This section shows how to use these properties in JViews Diagrammer JSF.
Removing the constraint on the manager content
<jvdf:diagrammerView constrainedOnContents="false" [...] />
Customizing the minimum and maximum zoom levels in free zoom mode
<jvdf:diagrammerView minZoomLevel="2" maxZoomLevel="20" [...] />
Specifying fixed zoom levels
<jvdf:diagrammerView zoomLevels="1.0, 2.0, 5.0, 10.0" [...] />

JViews Framework

This section shows how to use these properties with JViews Framework.
Removing the constraint on the manager content
<jvf:view constrainedOnContents="false" [...] />
Customizing the minimum and maximum zoom levels in free zoom mode
<jvf:view minZoomLevel="2" maxZoomLevel="20" [...] />
Specifying fixed zoom levels
<jvf:view zoomLevels="1.0, 2.0, 5.0, 10.0" [...] />