Pre: all paths must have been added to the PlotBoilerplate's drawable buffer (use the add(Drawable) function).
The move callback accepts four params:
Manually add a path to this helper.
Note that if autoAdjustPaths==true
then listeners will be installed to the path's vertices to
keep the path smooth at all times.
The path to add.
Duplicate path instances cannot be added; function will return false if path already exists.
This function should invalidate any installed listeners and invalidate this object. After calling this function the object might not hold valid data any more and should not be used any more.
Manually remove a path from this helper.
Note that this method ignores the allowPathRemoval
option.
The path to remove.
Returns false if the path could not be found.
Remove the path at the given index.
The index of the path (must be inside bounds, see this.paths
array).
Update the inner status by running the distance calculation again with the current settings.
Call this if any of the properties changed (like maxDetecDistance).
A helper function to add drag-end listeners to all vertices of the given path.
The Bézier path to add vertex listeners to.
The drag listeners to add to each path vertex.
void
A helper function to add drag listeners to all vertices of the given path.
The Bézier path to add vertex listeners to.
The drag listeners to add to each path vertex.
void
A helper function to add drag-start listeners to all vertices of the given path.
The Bézier path to add vertex listeners to.
The drag listeners to add to each path vertex.
void
A helper function to remove drag-end listeners to all vertices of the given path.
The Bézier path to remove vertex listeners from.
void
A helper function to remove drag listeners to all vertices of the given path.
The Bézier path to remove vertex listeners from.
The drag listeners to remove from each path vertex.
void
A helper function to remove drag-start listeners to all vertices of the given path.
The Bézier path to remove vertex listeners from.
void
Generated using TypeDoc
A helper for adding vertices to and remove vertices from Bézier paths. By default the 'delete' key is used to remove vertices or paths.
For convenience this helper is capable of handling multiple paths which are kept in an array.
Demo