SelectionManager
Selection Manager
Constructors
new SelectionManager()
new SelectionManager(
editor
):SelectionManager
Parameters
• editor: Editor
Returns
Source
Properties
editor
editor:
Editor
Source
onChange
onChange:
TypedEvent
<Shape
[]>
Source
shapes
shapes:
Shape
[]
Source
Methods
deselect()
deselect(
shapes
):void
Deselect the given shapes.
Parameters
• shapes: Shape
[]
Returns
void
Source
deselectAll()
deselectAll():
void
Deselect all shapes.
Returns
void
Source
getBoundingRect()
getBoundingRect(
canvas
):number
[][]
Returns bounding rect of selected shapes
Parameters
• canvas: Canvas
Returns
number
[][]
Source
getEnclosure()
getEnclosure(
canvas
):number
[][]
Returns enclosure of selected shapes
Parameters
• canvas: Canvas
Returns
number
[][]
Source
getShapes()
getShapes():
Shape
[]
Return selected shapes.
Returns
Shape
[]
an array of selected shapes.
Source
isChanged()
isChanged(
shapes
):boolean
isChanged
Parameters
• shapes: Shape
[]
Returns
boolean
Source
isSelected()
isSelected(
shape
):boolean
Parameters
• shape: Shape
Returns
boolean
Source
select()
select(
shapes
,clear
):void
Select shapes
Parameters
• shapes: Shape
[]
an array of shapes to be selected.
• clear: boolean
= true
clear the current selection if true.
Returns
void
Source
selectAll()
selectAll():
void
Select all shapes in the current page
Returns
void
Source
selectArea()
selectArea(
x1
,y1
,x2
,y2
,clear
):void
Select shapes overlap the given area in the current page.
Parameters
• x1: number
x-coordinate of the first corner of the area.
• y1: number
y-coordinate of the first corner of the area.
• x2: number
x-coordinate of the second corner of the area.
• y2: number
y-coordinate of the second corner of the area.
• clear: boolean
= true
clear the current selection if true.
Returns
void
Source
size()
size():
number
Return the number of selections
Returns
number