| Package | com.asterisq.constellation.behaviors |
| Class | public class NodeCenteringBehavior |
| Inheritance | NodeCenteringBehavior Behavior flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| centerNodeID : String
The node which will be centered by this behavior.
| NodeCenteringBehavior | ||
| constellation : IConstellation
[write-only]
| NodeCenteringBehavior | ||
![]() | enabled : Boolean
Indicates whether this behavior is currently enabled.
| Behavior | |
![]() | nodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
| Behavior | |
| scrollRate : Number
The rate at which the nodes are scrolled toward center.
| NodeCenteringBehavior | ||
| Method | Defined by | ||
|---|---|---|---|
|
NodeCenteringBehavior(scrollRate:Number = 0.1)
Creates a new behavior.
| NodeCenteringBehavior | ||
![]() |
affectsAcceleration():Boolean
Indicates whether this class affects node renderers' acceleration.
| Behavior | |
![]() |
affectsNodeRenderer(nr:INodeRenderer):Boolean
Determines whether this behavior affects the given node renderer.
| Behavior | |
|
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
| NodeCenteringBehavior | ||
![]() |
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
| Behavior | |
![]() |
[static]
Creates an IBehavior instance and initializes it with the given XML data.
| Behavior | |
![]() |
stepEnd():void
Method called at the end of a step.
| Behavior | |
|
stepStart():void
Method called at the beginning of a step.
| NodeCenteringBehavior | ||
![]() |
Modifies the given node renderer's acceleration.
| Behavior | |
|
Modifies the given node renderer's position.
| NodeCenteringBehavior | ||
![]() |
Modifies the given node renderer's velocity.
| Behavior | |
| Method | Defined by | ||
|---|---|---|---|
|
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
| NodeCenteringBehavior | ||
| centerNodeID | property |
centerNodeID:String [read-write]The node which will be centered by this behavior.
Implementation public function get centerNodeID():String
public function set centerNodeID(value:String):void
| constellation | property |
constellation:IConstellation [write-only]Implementation
public function set constellation(value:IConstellation):void
| scrollRate | property |
scrollRate:Number [read-write]The rate at which the nodes are scrolled toward center.
Implementation public function get scrollRate():Number
public function set scrollRate(value:Number):void
| NodeCenteringBehavior | () | constructor |
public function NodeCenteringBehavior(scrollRate:Number = 0.1)Creates a new behavior.
ParametersscrollRate:Number (default = 0.1) |
| affectsPosition | () | method |
public override function affectsPosition():BooleanIndicates whether this class affects node renderers' position. This function must return true if this behavior affects position.
ReturnsBoolean |
| loadValuesFromXML | () | method |
protected override function loadValuesFromXML(behaviorElem:XML):voidUpdates this behavior with values from the given XML element. This method should be overridden to update this Behavior.
ParametersbehaviorElem:XML |
| stepStart | () | method |
public override function stepStart():voidMethod called at the beginning of a step.
| updatePosition | () | method |
public override function updatePosition(nodeRenderer: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.
nodeRenderer:INodeRenderer |
INodeRenderer |