Methods
create(points, style, viewController) → {Konva.Group}
Create a protractor shape to be displayed.
Parameters:
Name | Type | Description |
---|---|---|
points | Array.<Point2D> | The points from which to extract the protractor. |
style | Style | The drawing style. |
viewController | ViewController | The associated view controller. |
- Source
Returns:
The Konva group.
- Type:
- Konva.
Group
getAnchors(shape, style) → {Array}
Get anchors to update a protractor shape.
Parameters:
Name | Type | Description |
---|---|---|
shape | Konva. | The associated shape. |
style | Style | The application style. |
- Source
Returns:
A list of anchors.
- Type:
- Array
getGroupName() → {string}
Get the name of the shape group.
- Source
Returns:
The name.
- Type:
- string
getNPoints() → {number}
Get the number of points needed to build the shape.
- Source
Returns:
The number of points.
- Type:
- number
getTimeout() → {number}
Get the timeout between point storage.
- Source
Returns:
The timeout in milliseconds.
- Type:
- number
isFactoryGroup(group) → {boolean}
Is the input group a group of this factory?
Parameters:
Name | Type | Description |
---|---|---|
group | Konva. | The group to test. |
- Source
Returns:
True if the group is from this fcatory.
- Type:
- boolean
update(anchor, style, _viewController)
Update a protractor shape.
Parameters:
Name | Type | Description |
---|---|---|
anchor | Konva. | The active anchor. |
style | Style | The app style. |
_viewController | ViewController | The associated view controller. |
- Source