Set the zoom percentage
- Last UpdatedJul 16, 2024
- 2 minute read
There are several distinct tasks that must be completed to enable programmatic zooming in a ViewApp. The following list shows the recommended order these tasks should be completed.
-
Determine the paired X and Y coordinate values that will serve as the center points of the programmatic zoom areas of the graphic.
-
Assign values to layout pane properties that affect programmatic zooming. See About Layout pane property effects on zoom behavior.
-
Create a set of attributes with the Namespace Editor that will be used in scripts and animation. See Set zoom percentage attributes.
-
Write a set of scripts and assign animations to enable programmatic zooming. See Minimal set of scripts and animations to enable programmatic zooming of graphics
Specify Zoom Center Point Coordinates of a Graphic
Before you create scripts and animations to set programmatic zooming of a graphic, you must determine the different X,Y coordinates within a graphic that you want to assign as the center points of the zoom areas.
To determine the zoom center point coordinates of a graphic
-
Open the graphic in the Graphic editor.
-
Place the mouse cursor directly over the point in the graphic that you want to set as the center point of a zoom area.
The current X and Y cursor values of the cursor location are shown in the status bar beneath the canvas area of the Graphic editor.

-
Save the coordinates of each location to specify them in action scripts.