--- title: "Perspective - View Canvas Scripting" --- # Perspective - View Canvas Scripting > This page details the various scripting, component, and extension functions available for [Perspective's View Canvas](perspective-view-canvas.md) component. ## Component Events The [Perspective Event Types Reference](appendix/reference-pages/perspective-event-types-reference.md) page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The [Component Events and Actions](ignition-modules/perspective/working-with-perspective-components/component-events-and-actions.md) page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component. ## onInstanceClicked Event is fired when a view instance is clicked. ### event.index * Object Path * event.index * Type * Number * Description * The index of the view instance. ### event.params * Object Path * event.params * Type * Dictionary * Description * The position of the view instance in relation to the canvas. ### event.path * Object Path * event.path * Type * String * Description * The path of the view instance. ### event.position * Object Path * event.position * Type * JSON Object * Description * A JSON Object representing the current position values. ### event.position.top * Object Path * event.position.top * Type * Number * Description * The top position of the view instance. ### event.position.left * Object Path * event.position.left * Type * Number * Description * The left position of the view instance. ### event.position.bottom * Object Path * event.position.bottom * Type * Number * Description * The bottom position of the view instance. ### event.position.right * Object Path * event.position.right * Type * Number * Description * The right position of the view instance. ### event.size * Object Path * event.size * Type * JSON Object * Description * A JSON Object representing the current size. ### event.size.width * Object Path * event.size.width * Type * Number * Description * The width of the view instance. ### event.size.height * Object Path * event.size.height * Type * Number * Description * The height of the view instance. ## Component Functions This component does not have component functions associated with it. ## Extension Functions This component does not have extension functions associated with it.