new SelectionBox()
This class is used to create a selection box which is used by visual unit for brushing and
selection in the canvas.
Methods
(static) defaultConfig() → {Object}
It returns the default configuration needed by selectionbox.
Returns:
Default configuration of the selection box.
- Type
- Object
(static) defaultConfig() → {Object}
It returns the default configuration needed by selectionbox.
Returns:
Default configuration of the selection box.
- Type
- Object
apply(dimension, conf, unitWidth, unitHeight)
Draws the selectionbox with the specified dimensions.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dimension |
Object | Dimensions of the selection box.
Properties
|
|||||||||||||||
conf |
Object | Configuration needed to draw the selection box | |||||||||||||||
unitWidth |
number | Width of the visual unit. | |||||||||||||||
unitHeight |
number | Height of the visual unit. |