Package | twaver.network.interaction |
Class | public class BasicInteractionHandler |
Inheritance | BasicInteractionHandler ![]() |
Implements | IInteractionHandler |
Subclasses | CreateLinkInteractionHandler, CreateShapeNodeInteractionHandler, DefaultInteractionHandler, EditInteractionHandler, MapFilterInteractionHandler, MoveInteractionHandler, PanInteractionHandler, SelectInteractionHandler |
IInteractionHandler
and does not offer any operation. Most other interactions
are extends from this class. You can create new interaction handler
from this class as well.
Here is an example how to install interaction handlers on network canvas
network.interactionHandlers = new Collection([ new SelectInteractionHandler(network), new EditInteractionHandler(network), new MoveInteractionHandler(network), new DefaultInteractionHandler(network), new MapFilterInteractionHandler(network), ]);
Property | Defined By | ||
---|---|---|---|
network : Network [read-only]
Get network component of this interaction. | BasicInteractionHandler |
Method | Defined By | ||
---|---|---|---|
BasicInteractionHandler(network:Network)
Interaction handler constructor. | BasicInteractionHandler | ||
installListeners():void
Install listeners on this interaction. | BasicInteractionHandler | ||
uninstallListeners():void
Uninstall listeners on this interaction. | BasicInteractionHandler |
Method | Defined By | ||
---|---|---|---|
dispatchEvent(kind:String, e:MouseEvent, element:IElement = null, resizeDirection:String = null, pointIndex:int = -1):void
Dispatch event to listeners. | BasicInteractionHandler |
network | property |
network:Network
[read-only] Get network component of this interaction.
protected function get network():Network
BasicInteractionHandler | () | Constructor |
public function BasicInteractionHandler(network:Network)
Interaction handler constructor. Create interaction handler for specified network component.
Parametersnetwork:Network — the network component this handler works for.
|
dispatchEvent | () | method |
protected function dispatchEvent(kind:String, e:MouseEvent, element:IElement = null, resizeDirection:String = null, pointIndex:int = -1):void
Dispatch event to listeners.
Parameters
kind:String — the dispatched event type.
| |
e:MouseEvent — combined mouse event.
| |
element:IElement (default = null ) — related element, default is null.
| |
resizeDirection:String (default = null ) — the resize direction of the operation. Default is null.
| |
pointIndex:int (default = -1 ) — index of the point. Default value is -1.
|
installListeners | () | method |
public function installListeners():void
Install listeners on this interaction.
uninstallListeners | () | method |
public function uninstallListeners():void
Uninstall listeners on this interaction.