Skip to content

SelectionManager

Selection Manager

Constructors

new SelectionManager()

new SelectionManager(editor): SelectionManager

Parameters

editor: Editor

Returns

SelectionManager

Source

selection-manager.ts:15

Properties

editor

editor: Editor

Source

selection-manager.ts:11


onChange

onChange: TypedEvent<Shape[]>

Source

selection-manager.ts:13


shapes

shapes: Shape[]

Source

selection-manager.ts:12

Methods

deselect()

deselect(shapes): void

Deselect the given shapes.

Parameters

shapes: Shape[]

Returns

void

Source

selection-manager.ts:119


deselectAll()

deselectAll(): void

Deselect all shapes.

Returns

void

Source

selection-manager.ts:131


getBoundingRect()

getBoundingRect(canvas): number[][]

Returns bounding rect of selected shapes

Parameters

canvas: Canvas

Returns

number[][]

Source

selection-manager.ts:141


getEnclosure()

getEnclosure(canvas): number[][]

Returns enclosure of selected shapes

Parameters

canvas: Canvas

Returns

number[][]

Source

selection-manager.ts:159


getShapes()

getShapes(): Shape[]

Return selected shapes.

Returns

Shape[]

an array of selected shapes.

Source

selection-manager.ts:45


isChanged()

isChanged(shapes): boolean

isChanged

Parameters

shapes: Shape[]

Returns

boolean

Source

selection-manager.ts:24


isSelected()

isSelected(shape): boolean

Parameters

shape: Shape

Returns

boolean

Source

selection-manager.ts:56


select()

select(shapes): void

Select shapes

Parameters

shapes: Shape[]

Returns

void

Source

selection-manager.ts:63


selectAdditional()

selectAdditional(shapes): void

Select additional shapes

Parameters

shapes: Shape[]

Returns

void

Source

selection-manager.ts:71


selectAll()

selectAll(): void

Select all shapes in the current page

Returns

void

Source

selection-manager.ts:106


selectArea()

selectArea(x1, y1, x2, y2): void

Select shapes overlap the given area in the current page.

Parameters

x1: number

y1: number

x2: number

y2: number

Returns

void

Source

selection-manager.ts:83


size()

size(): number

Return the number of selections

Returns

number

Source

selection-manager.ts:52