EllipseFactory

dwv.tool.draw. EllipseFactory

new EllipseFactory()

Source:

Ellipse factory.

Methods

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

Source:

Create an ellipse shape to be displayed.

Parameters:
Name Type Description
points Array

The points from which to extract the ellipse.

style object

The drawing style.

viewController object

The associated view controller.

Returns:

The Konva group.

Type
object

getAnchors(shape, style) → {Array}

Source:

Get anchors to update an ellipse shape.

Parameters:
Name Type Description
shape object

The associated shape.

style object

The application style.

Returns:

A list of anchors.

Type
Array

getGroupName() → {string}

Source:

Get the name of the shape group.

Returns:

The name.

Type
string

getNPoints() → {number}

Source:

Get the number of points needed to build the shape.

Returns:

The number of points.

Type
number

getTimeout() → {number}

Source:

Get the timeout between point storage.

Returns:

The timeout in milliseconds.

Type
number

isFactoryGroup(group) → {boolean}

Source:

Is the input group a group of this factory?

Parameters:
Name Type Description
group object

The group to test.

Returns:

True if the group is from this fcatory.

Type
boolean

update(anchor, _style, viewController)

Source:

Update an ellipse shape. Warning: do NOT use 'this' here, this method is passed as is to the change command.

Parameters:
Name Type Description
anchor object

The active anchor.

_style object

The app style.

viewController object

The associated view controller.

updateQuantification(group, viewController)

Source:

Update the quantification of an Ellipse.

Parameters:
Name Type Description
group object

The group with the shape.

viewController object

The associated view controller.