Pre: all paths must have been added to the PlotBoilerplate's drawable buffer (use the add(Drawable) function).
The move callback accepts four params:
BezierPathInteractionHelper
Private _keyPrivate _mousePrivate _mousePrivate _mousePrivate _touchPrivate allowPrivate autoPrivate currentAPrivate currentBPrivate currentPrivate currentPrivate currentTPrivate maxPrivate mousePrivate onPrivate onPrivate onPrivate onPrivate pathsPrivate pbpb
BezierPathInteractionHelper
Private _clearPrivate _handlePrivate _handlePrivate _handlePrivate _handlePrivate _installPrivate _installPrivate _installPrivate _locatePrivate _removePrivate _replacePrivate _updateManually 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.
addPath
BezierPathInteractionHelper
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.
removePath
BezierPathInteractionHelper
Static addA 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
addPathVertexDragEndListeners
BezierPathInteractionHelper
Static addA 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
addPathVertexDragListeners
BezierPathInteractionHelper
Static addA 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
addPathVertexDragStartListeners
BezierPathInteractionHelper
Static removeA helper function to remove drag-end listeners to all vertices of the given path.
The Bézier path to remove vertex listeners from.
void
removePathVertexDragEndListeners
BezierPathInteractionHelper
Static removeA 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
removePathVertexDragListeners
BezierPathInteractionHelper
Static removeA helper function to remove drag-start listeners to all vertices of the given path.
The Bézier path to remove vertex listeners from.
void
removePathVertexDragStartListeners
BezierPathInteractionHelper
Static set
Classdesc
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