Packagetwaver.network.interaction
Classpublic class BasicInteractionHandler
InheritanceBasicInteractionHandler Inheritance Object
Implements IInteractionHandler
Subclasses CreateLinkInteractionHandler, CreateShapeNodeInteractionHandler, DefaultInteractionHandler, EditInteractionHandler, MapFilterInteractionHandler, MoveInteractionHandler, PanInteractionHandler, SelectInteractionHandler

This class defines the basic interaction for network canvas. This is a simple implementation for interface 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),
	 ]);
	 



Protected Properties
 PropertyDefined By
  network : Network
[read-only] Get network component of this interaction.
BasicInteractionHandler
Public Methods
 MethodDefined By
  
Interaction handler constructor.
BasicInteractionHandler
  
Install listeners on this interaction.
BasicInteractionHandler
  
Uninstall listeners on this interaction.
BasicInteractionHandler
Protected Methods
 MethodDefined By
  
dispatchEvent(kind:String, e:MouseEvent, element:IElement = null, resizeDirection:String = null, pointIndex:int = -1):void
Dispatch event to listeners.
BasicInteractionHandler
Property Detail
networkproperty
network:Network  [read-only]

Get network component of this interaction.


Implementation
    protected function get network():Network
Constructor Detail
BasicInteractionHandler()Constructor
public function BasicInteractionHandler(network:Network)

Interaction handler constructor. Create interaction handler for specified network component.

Parameters
network:Network — the network component this handler works for.
Method Detail
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.