Ir al contenido

RotatingTool

Defined in: tool/RotatingTool.ts:8

Tool for rotating nodes around their center via the rotation handle.

new RotatingTool(): RotatingTool

RotatingTool

Tool.constructor

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 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


get isRotating(): boolean

Defined in: tool/RotatingTool.ts:15

Whether a rotation drag is in progress.

boolean


get rotatingNode(): Node | null

Defined in: tool/RotatingTool.ts:20

The node being rotated.

Node | null

canStart(_toolName, e): boolean

Defined in: tool/RotatingTool.ts:65

GoJS-compatible: start rotating when pressing on the rotation handle of a selected node.

string

MouseEvent

boolean

Tool.canStart


doActivate(): void

Defined in: tool/Tool.ts:38

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/RotatingTool.ts:77

Called when a mouse down event occurs.

MouseEvent

void

Tool.doMouseDown


doMouseMove(e): void

Defined in: tool/RotatingTool.ts:98

Called when a mouse move event occurs.

MouseEvent

void

Tool.doMouseMove


doMouseUp(_e): void

Defined in: tool/RotatingTool.ts:112

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


getRotationHandlePoint(node): object

Defined in: tool/RotatingTool.ts:29

Find the rotation handle’s actual screen (diagram-space) position for a node — above its top-center, then rotated around the node’s center by its current angle, matching how the renderer draws the handle.

Node

object

x: number

y: number


isOnRotationHandle(node, point): boolean

Defined in: tool/RotatingTool.ts:46

Check if a point is on the rotation handle of a node.

Node

number

number

boolean