Methods
constrainAnchorMove(anchor)
Constrain anchor movement.
Name | Type | Description |
---|---|---|
anchor | Konva. | The active anchor. |
- Source
createShapeGroup(annotation, style) → {Konva.Group}
Create an ellipse shape to be displayed.
Name | Type | Description |
---|---|---|
annotation | Annotation | The associated annotation. |
style | Style | The drawing style. |
- Source
The Konva group.
- Type:
- Konva.
Group
getAnchors(shape, style) → {Array.<Konva.Ellipse>}
Get anchors to update a ellipse shape.
Name | Type | Description |
---|---|---|
shape | Konva. | The associated shape. |
style | Style | The application style. |
- Source
A list of anchors.
- Type:
- Array.<Konva.Ellipse>
getGroupName() → {string}
Get the name of the shape group.
- Source
The name.
- Type:
- string
getNPoints() → {number}
Get the number of points needed to build the shape.
- Source
The number of points.
- Type:
- number
getName() → {string}
Get the name of the factory.
- Source
The name.
- Type:
- string
getTimeout() → {number}
Get the timeout between point storage.
- Source
The timeout in milliseconds.
- Type:
- number
setAnnotationMathShape(annotation, points)
Set an annotation math shape from input points.
Name | Type | Description |
---|---|---|
annotation | Annotation | The annotation. |
points | Array.<Point2D> | The points. |
- Source
updateAnnotationOnAnchorMove(annotation, anchor)
Update an annotation on anchor move.
Name | Type | Description |
---|---|---|
annotation | Annotation | The annotation. |
anchor | Konva. | The anchor. |
- Source
updateAnnotationOnTranslation(annotation, translation)
Update an annotation on translation (shape move).
Name | Type | Description |
---|---|---|
annotation | Annotation | The annotation. |
translation | object | The translation. |
- Source
updateConnector(group)
Update the shape connector.
Name | Type | Description |
---|---|---|
group | Konva. | The shape group. |
- Source
updateLabelContent(annotation, group, _style)
Update the shape label.
Name | Type | Description |
---|---|---|
annotation | Annotation | The associated annotation. |
group | Konva. | The shape group. |
_style | Style | The application style. |
- Source
updateShapeGroupOnAnchorMove(annotation, anchor, style)
Update shape and label on anchor move taking the updated annotation as input.
Name | Type | Description |
---|---|---|
annotation | Annotation | The associated annotation. |
anchor | Konva. | The active anchor. |
style | Style | The application style. |
- Source
(static) supports(mathShape) → {boolean}
Does this factory support the input math shape.
Name | Type | Description |
---|---|---|
mathShape | object | The mathematical shape. |
- Source
True if supported.
- Type:
- boolean