Packagecom.asterisq.constellation.behaviors
Classpublic class DraggingBehavior
InheritanceDraggingBehavior Inheritance Behavior Inheritance flash.events.EventDispatcher

Behavior which enables node renderer dragging. The acceleration is set to zero and the node renderer is placed under the mouse cursor. Only affects nodes that implement the com.asterisq.constellation.renderers.IDraggableNodeRenderer interface.



Public Properties
 PropertyDefined by
 Inheritedconstellation : IConstellation
The constellation instance this behavior belongs to.
Behavior
 Inheritedenabled : Boolean
Indicates whether this behavior is currently enabled.
Behavior
 InheritednodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
Behavior
Public Methods
 MethodDefined by
  
Creates a new dragging behavior.
DraggingBehavior
  
Indicates whether this class affects node renderers' acceleration.
DraggingBehavior
 Inherited
Determines whether this behavior affects the given node renderer.
Behavior
  
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
DraggingBehavior
 Inherited
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
Behavior
 Inherited
fromXML(elem:XML):Behavior
[static] Creates an IBehavior instance and initializes it with the given XML data.
Behavior
 Inherited
stepEnd():void
Method called at the end of a step.
Behavior
 Inherited
stepStart():void
Method called at the beginning of a step.
Behavior
  
Modifies the given node renderer's acceleration.
DraggingBehavior
  
Modifies the given node renderer's position.
DraggingBehavior
 Inherited
Modifies the given node renderer's velocity.
Behavior
Protected Methods
 MethodDefined by
 Inherited
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
Behavior
Constructor detail
DraggingBehavior()constructor
public function DraggingBehavior()

Creates a new dragging behavior.

Method detail
affectsAcceleration()method
public override function affectsAcceleration():Boolean

Indicates whether this class affects node renderers' acceleration. This function must return true if this behavior affects acceleration.

Returns
Boolean
affectsPosition()method 
public override function affectsPosition():Boolean

Indicates whether this class affects node renderers' position. This function must return true if this behavior affects position.

Returns
Boolean
updateAcceleration()method 
public override function updateAcceleration(nr:INodeRenderer):INodeRenderer

Modifies the given node renderer's acceleration. This method will never be called if affectsAcceleration() doesn't return true. This method should be overridden to affect the given node renderer's acceleration.

Parameters
nr:INodeRenderer

Returns
INodeRenderer
updatePosition()method 
public override function updatePosition(nr:INodeRenderer):INodeRenderer

Modifies the given node renderer's position. This method will never be called if affectsPosition() doesn't return true. This method should be overridden to affect the given node renderer's position.

Parameters
nr:INodeRenderer

Returns
INodeRenderer