EllipseFactory

Ellipse factory.

Constructor

new EllipseFactory()

Methods

create(points, style, viewController) → {object}

Create an ellipse shape to be displayed.

Parameters:
NameTypeDescription
pointsArray

The points from which to extract the ellipse.

styleobject

The drawing style.

viewControllerobject

The associated view controller.

Returns:

The Konva group.

Type: 
object

getAnchors(shape, style) → {Array}

Get anchors to update an ellipse shape.

Parameters:
NameTypeDescription
shapeobject

The associated shape.

styleobject

The application style.

Returns:

A list of anchors.

Type: 
Array

getGroupName() → {string}

Get the name of the shape group.

Returns:

The name.

Type: 
string

getNPoints() → {number}

Get the number of points needed to build the shape.

Returns:

The number of points.

Type: 
number

getTimeout() → {number}

Get the timeout between point storage.

Returns:

The timeout in milliseconds.

Type: 
number

isFactoryGroup(group) → {boolean}

Is the input group a group of this factory?

Parameters:
NameTypeDescription
groupobject

The group to test.

Returns:

True if the group is from this fcatory.

Type: 
boolean

update(anchor, _style, viewController)

Update an ellipse shape.

Parameters:
NameTypeDescription
anchorobject

The active anchor.

_styleobject

The app style.

viewControllerobject

The associated view controller.

updateQuantification(group, viewController)

Update the quantification of an Ellipse.

Parameters:
NameTypeDescription
groupobject

The group with the shape.

viewControllerobject

The associated view controller.