--- title: "Perspective - Drawing Scripting" --- # Perspective - Drawing Scripting > This page details the various scripting, component, and extension functions available for Perspective's [Drawing](appendix\components\perspective-components\perspective-display-palette\perspective-drawing\perspective-drawing.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. ### onElementClicked This event is fired when an element in the drawing has been clicked. #### event.elementAddress * Object Path * event.elementAddress * Type * List * Description * An array of numbers indicating where the clicked element is in the elements tree. For example, [0,2,1] would be the second child of the third child of the first element. #### event.elementName * Object Path * event.elementName * Type * String * Description * The name attribute of the element that was clicked. #### event.event * Object Path * event.event * Type * Dictionary * Description * The event object generated from the mouse click.