Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Operations Management Interface

Minimal set of scripts and animations to enable programmatic zooming of graphics

Minimal set of scripts and animations to enable programmatic zooming of graphics

  • Last UpdatedDec 06, 2024
  • 3 minute read

As part of building a ViewApp that incorporates user controls to resize graphics during runtime, scripting and animation must be associated with the user controls.

Note: This topic describes a minimal set of scripts and animations to enable programmatic zooming of graphics. More complex scripting can be used to provide additional zoom features or displays.

Create an Action Script for Each Zoom Center Point

The following figure shows an example of an action script to set the center point of a zoom area on a graphic. In this example, the script determines the current display mode of the pane and then sets a zoom percentage. The script then sets the X and Y coordinates of a center point of the zoom area that has been previously mapped on the graphic.

Typically, the action script is associated with a button that the user selects to move to the center point of the zoom area of the graphic.

Zoom XY Action Script

Important: In scripts, the attribute that sets the zoom percentage value must be declared before the attributes that specify the X and Y coordinates of the zoom area. The X and Y coordinates can be specified in any order.

Create an Action Script to Select Different Layouts Based on the Display Mode Property Value

This type of script is optional. If you want to change layouts containing different graphics during runtime based on a selected Display Mode, create an action script that includes the ShowContent method. In this example, a different layout is used for each possible Display Mode property value, which are associated with buttons.

Action script for animations

Create User Input Animation to Set Zoom Values

The following figure shows an example of User Input animation to set the zoom level of a graphic. In this example, the user selects a data entry field during runtime.

Zoom XY User Input Animation

Create Value Display Animation to Show Current Graphic Coordinates

You may want to show the current zoom area coordinates of your graphic during runtime. The following figure shows an example of Value Display animation that shows the current X coordinate value of the center point of a zoom area. You can also use Value Display animation to show the current zoom level of the graphic.

Value Display animation showing the current X coordinate value of the center point of a zoom area

TitleResults for “How to create a CRG?”Also Available in