blockly > Gesture > (constructor)
Gesture.(constructor)
Constructs a new instance of the Gesture
class
Signature:
constructor(e: PointerEvent, creatorWorkspace: WorkspaceSvg);
Parameters
Parameter |
Type |
Description |
e |
PointerEvent |
The event that kicked off this gesture. |
creatorWorkspace |
WorkspaceSvg |
The workspace that created this gesture and has a reference to it. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["A Gesture object is initiated by a pointer event and is associated with a specific workspace."],["The constructor for the `Gesture` class takes a PointerEvent and a WorkspaceSvg object as arguments to initialize a new Gesture instance."]]],["The `Gesture` class is instantiated using a constructor that accepts two parameters: `e`, a `PointerEvent` object representing the initiating event, and `creatorWorkspace`, a `WorkspaceSvg` instance that created and references the gesture. This constructor creates a new `Gesture` object, effectively starting the gesture based on the provided event and workspace information. The `PointerEvent` provides details about the triggering event and `creatorWorkspace` indicates the context of the gesture.\n"]]