# WebPages Display $ Functions

The following $ functions can be called via script when a Display element is on a WebPage:

Function | Property Parameters (with Data Type) | Description
--- | --- | ---
$WebPages.WebPage.Display.CancelEditGraphic |  | This command cancels edits made to a graphic; if there are multiple buttons with Edit Graphic commands on a WebPage, a single button with the Cancel Edit Graphic function will work with all of the Edit Graphic buttons.
$WebPages.WebPage.Display.EditGraphic | address: String | This function is tied to a specific In-Sight Vision Tool Controls Functions graphic, typically for editing a Region of Interest (ROI). When configuring the Edit Graphic function, the address property must be specified, which defines which ROI control the graphic corresponds to:
    $WebPages.WebPage.Display.EditGraphic("/cam0/app/sheets/Tasks_Task_InSightToolBlock/cells/Region");
Note: The address property string contains sections that may vary, based on the names given to various pieces of the job (i.e. these properties can be renamed by the user).
$WebPages.WebPage.Display.EndEditGrapic |  | This function accepts any changes made to a graphic, and saves the changes to the vision system. If there are multiple buttons with Edit Graphic functions on a WebPage, a single button with the End Edit Graphic function will work with all of the Edit Graphic buttons.
$WebPages.WebPage.Display.Pan | x: Double, y: Double | Provides the ability to move the image horizontally and vertically. X and Y coordinates can be specified.
$WebPages.WebPage.Display.PanTo | x: Double, y: Double | Provides the ability to move to a specific pixel location, horizontally and vertically, within the image. X and Y coordinates can be specified; the center of the graphic will be at the specified coordinates.
$WebPages.WebPage.Display.Rotate90CCW |  | Rotates the image 90° counter-clockwise.
$WebPages.WebPage.Display.Rotate90CW |  | Rotates the image 90° clockwise.
$WebPages.WebPage.Display.ZoomIn |  | Provides the ability to zoom in the image.
$WebPages.WebPage.Display.ZoomOut |  | Provides the ability to zoom out of the image.
$WebPages.WebPage.Display.ZoomToFill |  | Provides an automatic scaling option to scale the image will fill the entire display area.
$WebPages.WebPage.Display.ZoomToFit |  | Provides an automatic scaling option to scale the image as large as possible, while still displaying the entire image. If the aspect ratio of the display area differs from the image, this option will result in either horizontal or vertical blank areas within the display.
$WebPages.WebPage.Display.ZoomToFixed |  | Provides a manual scaling mode option in which the scale factor between the image and display is fixed, independent of the display size.