Packagecom.yworks.graph.anim
Classpublic class LayoutMorpherWrapper
InheritanceLayoutMorpherWrapper Inheritance flash.events.EventDispatcher

Convenience class that wraps GraphMorpher for use with LayoutGraph instances.

See also

GraphMorpher
LayoutGraph


Public Properties
 PropertyDefined By
  duration : Number
[write-only] The preferred duration in milliseconds.
LayoutMorpherWrapper
  easingFunction : Function
[write-only] The easing function used for the animation tween.
LayoutMorpherWrapper
  newBounds : IRectangle
[write-only] The new bounds of the graph.
LayoutMorpherWrapper
  newViewPoint : Point
[write-only] The view point the graph should arrive at.
LayoutMorpherWrapper
  newZoom : Number
[write-only] The target zoom value.
LayoutMorpherWrapper
Public Methods
 MethodDefined By
  
LayoutMorpherWrapper(graphCanvas:GraphCanvasComponent, layout:GraphLayout, newBounds:IRectangle = null, newViewPoint:Point = null, newZoom:Number = -1, tableLayoutConfigurator:TableLayoutConfigurator = null)
Creates a new LayoutMorpherWrapper instance.
LayoutMorpherWrapper
  
[static] Convenience method to create a LayoutMorpherWrapper that morphs the layout from a CopiedLayoutGraph to the graph in the given graphCanvas.
LayoutMorpherWrapper
  
play():void
Starts the animation.
LayoutMorpherWrapper
  
stop():void
Stops the animation, if it is currently running.
LayoutMorpherWrapper
Events
 Event Summary Defined By
  Dispatched when the graph animation ended.LayoutMorpherWrapper
  Dispatched before the graph animation starts.LayoutMorpherWrapper
Property Detail
durationproperty
duration:Number  [write-only]

The preferred duration in milliseconds.


Implementation
    public function set duration(value:Number):void
easingFunctionproperty 
easingFunction:Function  [write-only]

The easing function used for the animation tween.


Implementation
    public function set easingFunction(value:Function):void

See also

mx.effects.Tween.easingFunction
newBoundsproperty 
newBounds:IRectangle  [write-only]

The new bounds of the graph.

This property is ignored.


Implementation
    public function set newBounds(value:IRectangle):void
newViewPointproperty 
newViewPoint:Point  [write-only]

The view point the graph should arrive at.


Implementation
    public function set newViewPoint(value:Point):void
newZoomproperty 
newZoom:Number  [write-only]

The target zoom value.


Implementation
    public function set newZoom(value:Number):void
Constructor Detail
LayoutMorpherWrapper()Constructor
public function LayoutMorpherWrapper(graphCanvas:GraphCanvasComponent, layout:GraphLayout, newBounds:IRectangle = null, newViewPoint:Point = null, newZoom:Number = -1, tableLayoutConfigurator:TableLayoutConfigurator = null)

Creates a new LayoutMorpherWrapper instance.

This constructor is suitable for morphing an IGraph to a layout computed by one of the layout algorithms:

     var adapter:LayoutGraphAdapter = new LayoutGraphAdapter(graph);
     var layouter:OrthogonalLayouter = new OrthogonalLayouter();
     var layout:GraphLayout = layouter.calcLayout(adapter, adapter);
     var morpher:LayoutMorpherWrapper = new LayoutMorpherWrapper(graphCanvas, layout);
     

Parameters
graphCanvas:GraphCanvasComponent — The GraphCanvasComponent containing the graph the layout should be morphed into.
 
layout:GraphLayout — The target layout with respect to the layoutGraph.
 
newBounds:IRectangle (default = null) — The target graph bounds. If none are provided, they will be calculated from the target layout.

This parameter is ignored when the yFiles FLEX library 1.4.x or less is referenced.

 
newViewPoint:Point (default = null) — The view point to morph to. If none is provided, the current view point is kept.
 
newZoom:Number (default = -1) — The zoom to morph to. If a value < 0 is provided, the current zoom is kept.
 
tableLayoutConfigurator:TableLayoutConfigurator (default = null) — The TableLayoutConfigurator which was used to configure the tables for the layout or null if the layout was not configured for tables.
Method Detail
createWrapperForCopiedGraph()method
public static function createWrapperForCopiedGraph(graphCanvas:GraphCanvasComponent, clg:CopiedLayoutGraph):LayoutMorpherWrapper

Convenience method to create a LayoutMorpherWrapper that morphs the layout from a CopiedLayoutGraph to the graph in the given graphCanvas.

Parameters

graphCanvas:GraphCanvasComponent — The canvas containing the graph to morph the layout to.
 
clg:CopiedLayoutGraph — The copied layout graph containing the calculated layout.

Returns
LayoutMorpherWrapper — The created LayoutMorpherWrapper instance.
play()method 
public function play():void

Starts the animation.

stop()method 
public function stop():void

Stops the animation, if it is currently running.

Event Detail
morphEnd Event
Event Object Type: com.yworks.graph.anim.GraphMorphEvent
GraphMorphEvent.type property = GraphMorphEvent.MORPH_END

Dispatched when the graph animation ended.

morphStart Event  
Event Object Type: com.yworks.graph.anim.GraphMorphEvent
GraphMorphEvent.type property = GraphMorphEvent.MORPH_START

Dispatched before the graph animation starts.