Ir al contenido

DraggingTool

Defined in: tool/DraggingTool.ts:11

Tool for dragging nodes.

new DraggingTool(): DraggingTool

DraggingTool

Tool.constructor

guidelineSnapDistance: number = 6

Defined in: tool/DraggingTool.ts:25

Maximum distance (in document units) at which an alignment guideline snaps.


isGuidedDraggingEnabled: boolean = false

Defined in: tool/DraggingTool.ts:22

GoJS-compatible (“GuidedDraggingTool” extension style): when true, dragging a single part snaps to, and shows dashed guidelines for, the edges/centers of nearby parts. Ignored while Diagram.isSnapToGridEnabled() is true.

get diagram(): Diagram | null

Defined in: tool/Tool.ts:13

Get the diagram this tool belongs to.

Diagram | null

set diagram(value): void

Defined in: tool/Tool.ts:18

Set the diagram this tool belongs to.

Diagram | null

void

ZoomingTool.diagram


get isActive(): boolean

Defined in: tool/Tool.ts:23

Check if this tool is currently active.

boolean

Tool.isActive


get isDragging(): boolean

Defined in: tool/DraggingTool.ts:27

boolean


get isEnabled(): boolean

Defined in: tool/Tool.ts:28

Check if this tool is enabled.

boolean

set isEnabled(value): void

Defined in: tool/Tool.ts:33

Enable or disable this tool.

boolean

void

ZoomingTool.isEnabled

canStart(_toolName, e): boolean

Defined in: tool/DraggingTool.ts:36

GoJS-compatible: start dragging when the primary button is on a movable node.

string

MouseEvent

boolean

Tool.canStart


doActivate(): void

Defined in: tool/DraggingTool.ts:31

Called when the tool becomes the active tool.

void

Tool.doActivate


doClick(_e): void

Defined in: tool/Tool.ts:78

Called when a click event occurs.

MouseEvent

void

Tool.doClick


doDeactivate(): void

Defined in: tool/Tool.ts:43

Called when the tool is deactivated.

void

Tool.doDeactivate


doDoubleClick(_e): void

Defined in: tool/Tool.ts:83

Called when a double click event occurs.

MouseEvent

void

Tool.doDoubleClick


doKeyDown(_e): void

Defined in: tool/Tool.ts:68

Called when a key down event occurs.

KeyboardEvent

void

Tool.doKeyDown


doKeyUp(_e): void

Defined in: tool/Tool.ts:73

Called when a key up event occurs.

KeyboardEvent

void

Tool.doKeyUp


doMouseDown(e): void

Defined in: tool/DraggingTool.ts:49

Called when a mouse down event occurs.

MouseEvent

void

Tool.doMouseDown


doMouseMove(e): void

Defined in: tool/DraggingTool.ts:107

Called when a mouse move event occurs.

MouseEvent

void

Tool.doMouseMove


doMouseUp(_e): void

Defined in: tool/DraggingTool.ts:253

Called when a mouse up event occurs.

MouseEvent

void

Tool.doMouseUp


doMouseWheel(_e): void

Defined in: tool/Tool.ts:63

Called when a mouse wheel event occurs.

WheelEvent

void

Tool.doMouseWheel


doStart(_e): void

Defined in: tool/Tool.ts:90

GoJS-compatible: Called when a tool operation starts (after canStart returns true).

MouseEvent

void

Tool.doStart


doStop(): void

Defined in: tool/Tool.ts:97

GoJS-compatible: Called when a tool operation stops.

void

Tool.doStop


findPartAt(x, y): Part | null

Defined in: tool/Tool.ts:110

Find a part at the given diagram coordinates.

number

number

Part | null

Tool.findPartAt


getDiagramPoint(e): object

Defined in: tool/Tool.ts:116

Get the mouse position in diagram coordinates.

MouseEvent

object

x: number

y: number

Tool.getDiagramPoint