Class: Gesture
Defined in: packages/blockly/core/gesture.ts:56
Class for one gesture.
Properties index
| Property | Description |
|---|---|
| startWorkspace_ | The workspace that the gesture started on. There may be multiple workspaces on a page; this is more accurate than using Blockly.common.getMainWorkspace(). |
| isEnding_ | Boolean used internally to break a cycle in disposal. |
| currentDropdownOwner | The owner of the dropdownDiv when this gesture first starts. Needed because we'll close the dropdown before fields get to act on their events, and some fields care about who owns the dropdown. |
Methods index
| Method | Description |
|---|---|
| getCurrentDragger | Returns the current dragger if the gesture is a drag. |
| inProgress | Is a drag or other gesture currently in progress on any workspace? |
Constructors
Constructor
new Gesture(e, creatorWorkspace): Gesture;
Defined in: packages/blockly/core/gesture.ts:183
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. |
Returns
Gesture
Properties
startWorkspace_
protected startWorkspace_: WorkspaceSvg | null = null;
Defined in: packages/blockly/core/gesture.ts:108
The workspace that the gesture started on. There may be multiple workspaces on a page; this is more accurate than using Blockly.common.getMainWorkspace().
isEnding_
protected isEnding_: boolean = false;
Defined in: packages/blockly/core/gesture.ts:145
Boolean used internally to break a cycle in disposal.
currentDropdownOwner
currentDropdownOwner: Field<any> | null = null;
Defined in: packages/blockly/core/gesture.ts:176
The owner of the dropdownDiv when this gesture first starts. Needed because we'll close the dropdown before fields get to act on their events, and some fields care about who owns the dropdown.
Methods
getCurrentDragger()
getCurrentDragger():
| IDragger
| WorkspaceDragger
| null;
Defined in: packages/blockly/core/gesture.ts:1119
Returns the current dragger if the gesture is a drag.
Returns
| IDragger
| WorkspaceDragger
| null
inProgress()
static inProgress(): boolean;
Defined in: packages/blockly/core/gesture.ts:1152
Is a drag or other gesture currently in progress on any workspace?
Returns
boolean
True if gesture is occurring.