Skip to content

Manipulator

Manipulator

Constructors

new Manipulator()

new Manipulator(): Manipulator

Returns

Manipulator

Source

packages/core/src/editor.ts:1948

Properties

controllers

controllers: Controller[]

Controllers of the manipulator

Source

packages/core/src/editor.ts:1941


draggingController

draggingController: null | Controller

Dragging controller

Source

packages/core/src/editor.ts:1946

Methods

draw()

draw(editor, shape): void

Draw controllers

Parameters

editor: Editor

shape: Shape

Returns

void

Source

packages/core/src/editor.ts:2082


drawHovering()

drawHovering(editor, shape, e, thickness): void

Draw hovering for the shape

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

thickness: number= 1.5

Returns

void

Source

packages/core/src/editor.ts:2096


isDragging()

isDragging(): boolean

Returns one of controllers is dragging or not

Returns

boolean

Source

packages/core/src/editor.ts:1956


keyDown()

keyDown(editor, shape, e): boolean

Handle keydown event

Parameters

editor: Editor

shape: Shape

e: KeyboardEvent

Returns

boolean

handled or not

Source

packages/core/src/editor.ts:2049


keyUp()

keyUp(editor, shape, e): boolean

Handle keyup event

Parameters

editor: Editor

shape: Shape

e: KeyboardEvent

Returns

boolean

handled or not

Source

packages/core/src/editor.ts:2066


mouseCursor()

mouseCursor(editor, shape, e): null | [string, number]

Returns mouse cursor for the manipulator

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

Returns

null | [string, number]

cursor object

Source

packages/core/src/editor.ts:1983


mouseIn()

mouseIn(editor, shape, e): boolean

Returns true if mouse cursor is inside the shape or control points

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

Returns

boolean

Source

packages/core/src/editor.ts:1963


mouseInHandles()

mouseInHandles(editor, shape, e): boolean

Returns true if mouse cursor is inside the controller’s handles

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

Returns

boolean

Source

packages/core/src/editor.ts:1972


pointerDown()

pointerDown(editor, shape, e): boolean

Handle pointer down event

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

Returns

boolean

handled or not

Source

packages/core/src/editor.ts:2003


pointerMove()

pointerMove(editor, shape, e): boolean

Handle pointer move event

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

Returns

boolean

handled or not

Source

packages/core/src/editor.ts:2021


pointerUp()

pointerUp(editor, shape, e): boolean

Handle pointer up event

Parameters

editor: Editor

shape: Shape

e: CanvasPointerEvent

Returns

boolean

handled or not

Source

packages/core/src/editor.ts:2036