Set zoom percentage attributes
- Last UpdatedDec 06, 2024
- 2 minute read
The following figure shows an example set of attributes created with the Namespace editor to control zoom behavior with scripts. In this example, the MyZoom Galaxy namespace has been created to contain the zoom attributes.
These attributes can be used in action scripts and a variety of animations to select a zoom level and center point of a zoom area during runtime.

The following table describes a suggested set of attributes that provide programmatic zoom levels based on the example attributes shown in the figure above.
|
Attribute |
Script or Animation |
Purpose |
|
CurrentX |
Value Display animation |
An integer value that shows the current X value of the center point of a zoom area. |
|
CurrentY |
Value Display animation |
An integer value that shows the current Y value of the center point of a zoom area. |
|
CurrentZoom |
Value Display animation |
An integer values that shows the current zoom level. |
|
Mode |
Action Script |
An integer value that specifies the pane's display mode.
|
|
X |
Action Script |
An integer value that sets the X coordinate value of the center point of the zoom area. |
|
Y |
Action Script |
An integer value that sets the Y coordinate value of the center point of the zoom area. |
|
ZoomAspect Stretch |
Action Script |
An integer that sets the zoom percentage when the value of the Mode attribute is set to Maintain Aspect or Stretch. |
|
ZoomSize |
Scripts and User Input animation |
An integer that sets the zoom percentage when the value of the Mode attribute is set to Maintain Size. |
|
ZoomTo |
Scripts and User Input animation |
An integer that sets the zoom percentage. The zoom range minimum or maximum percentage values can be specified by using ZoomTo in an animation expression. MyViewApp.MyZoom.ZoomTo<10 MyViewApp.MyZoom.ZoomTo>4999 Zoom in and zoom out buttons are disabled when the ZoomTo attribute expression is true. |
For more information about using these attributes in scripts and animation, see Minimal set of scripts and animations to enable programmatic zooming of graphics.