Package | com.yworks.graph.anim |
Class | public class GraphMorpher |
Inheritance | GraphMorpher flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
duration : Number [write-only]
The duration of the animation in milliseconds. | GraphMorpher | ||
easingFunction : Function [write-only]
The easing function used for the animation tween. | GraphMorpher | ||
newBounds : IRectangle [read-only]
The new bounds of the graph. | GraphMorpher | ||
newViewPoint : Point [write-only]
The view point the graph should arrive at. | GraphMorpher | ||
newZoom : Number [write-only]
The target zoom value. | GraphMorpher |
Method | Defined By | ||
---|---|---|---|
GraphMorpher(graphCanvas:GraphCanvasComponent, newBounds:IRectangle, newViewPoint:Point = null, newZoom:Number = -1, localViewMode:Boolean = false)
Constructor. | GraphMorpher | ||
addEdge(edge:IEdge, endBends:IBendList, endSourcePort:IPort, endTargetPort:IPort, callback:IChangeDummyEdgeAppearanceCallback = null):void
Add an edge that should be animated. | GraphMorpher | ||
Add a node that should be animated. | GraphMorpher | ||
Add an IReshapeable to the animation. | GraphMorpher | ||
GraphMorpher | |||
cleanBends():void
Removes extra bends which were inserted while morphing. | GraphMorpher | ||
Returns the location the given node will be morphed to or null
if this GraphMorpher doesn't know the given node. | GraphMorpher | ||
play():void
Start the animation. | GraphMorpher | ||
stop():void
Stops the animation, if it is currently running. | GraphMorpher |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when the graph animation ended. | GraphMorpher |
duration | property |
duration:Number
[write-only] The duration of the animation in milliseconds.
The default value is 500
.
public function set duration(value:Number):void
easingFunction | property |
easingFunction:Function
[write-only] The easing function used for the animation tween.
public function set easingFunction(value:Function):void
See also
newBounds | property |
newBounds:IRectangle
[read-only] The new bounds of the graph.
public function get newBounds():IRectangle
newViewPoint | property |
newViewPoint:Point
[write-only] The view point the graph should arrive at.
public function set newViewPoint(value:Point):void
newZoom | property |
newZoom:Number
[write-only] The target zoom value.
public function set newZoom(value:Number):void
GraphMorpher | () | Constructor |
public function GraphMorpher(graphCanvas:GraphCanvasComponent, newBounds:IRectangle, newViewPoint:Point = null, newZoom:Number = -1, localViewMode:Boolean = false)
Constructor.
ParametersgraphCanvas:GraphCanvasComponent — The GraphCanvasComponent to work on.
| |
newBounds:IRectangle — The new bounds of the graph.
| |
newViewPoint:Point (default = null ) — The target view point. If null , the view point of the graph will not change.
| |
newZoom:Number (default = -1 ) — The target zoom level. If -1 , the zoom level will not change.
| |
localViewMode:Boolean (default = false )
|
addEdge | () | method |
public function addEdge(edge:IEdge, endBends:IBendList, endSourcePort:IPort, endTargetPort:IPort, callback:IChangeDummyEdgeAppearanceCallback = null):void
Add an edge that should be animated.
Parameters
edge:IEdge — The edge to animated.
| |
endBends:IBendList — The bends of the edge after the animation.
| |
endSourcePort:IPort — The source port of the edge after the animation.
| |
endTargetPort:IPort — The target port of the edge after the animation.
| |
callback:IChangeDummyEdgeAppearanceCallback (default = null )
|
addNode | () | method |
public function addNode(node:INode, targetLayout:IRectangle):void
Add a node that should be animated.
Parameters
node:INode — The node to be animated.
| |
targetLayout:IRectangle — The position and size the node should be animated to.
|
addReshapeable | () | method |
public function addReshapeable(reshapeable:IReshapeable, sourceLayout:IRectangle, targetLayout:IRectangle):void
Add an IReshapeable
to the animation.
Parameters
reshapeable:IReshapeable — A reshapbeable that will be reshaped during the animation
| |
sourceLayout:IRectangle — the layout at the beginning of the animation
| |
targetLayout:IRectangle — the layout at the end of the animation
|
addStripe | () | method |
public function addStripe(stripe:IStripe, targetSize:Number):void
Parameters
stripe:IStripe | |
targetSize:Number |
cleanBends | () | method |
public function cleanBends():void
Removes extra bends which were inserted while morphing.
getTargetNodeLocation | () | method |
public function getTargetNodeLocation(node:INode):IPoint
Returns the location the given node will be morphed to or null if this GraphMorpher doesn't know the given node.
Parameters
node:INode — the node which is queried.
|
IPoint — the node's location.
|
play | () | method |
public function play():void
Start the animation.
When the animation has ended, a GraphMorphEvent
is dispatched.
stop | () | method |
public function stop():void
Stops the animation, if it is currently running.
This will trigger the GraphMorphEvent.MORPH_END
event.
morphEnd | Event |
com.yworks.graph.anim.GraphMorphEvent
GraphMorphEvent.MORPH_END
Dispatched when the graph animation ended.