Implements animation for morphing cells. Here is an example of using this class for animating the result of a layout algorithm:
graph.getModel().beginUpdate(); try { var circleLayout = new mxCircleLayout(graph); circleLayout.execute(graph.getDefaultParent()); } finally { var morph = new mxMorphing(graph); morph.addListener(mxEvent.DONE, function() { graph.getModel().endUpdate(); }); morph.startAnimation(); }
mxMorphing | Implements animation for morphing cells. |
Functions | |
mxMorphing | Constructs an animation. |
Variables | |
graph | Specifies the delay between the animation steps. |
steps | Specifies the maximum number of steps for the morphing. |
step | Contains the current step. |
ease | Ease-off for movement towards the given vector. |
cells | Optional array of cells to be animated. |
Functions | |
updateAnimation | Animation step. |
show | Shows the changes in the given mxCellStatePreview. |
animateCell | Animates the given cell state using mxCellStatePreview.moveState. |
stopRecursion | Returns true if the animation should not recursively find more deltas for children if the given parent state has been animated. |
getDelta | Returns the vector between the current rendered state and the future location of the state after the display will be updated. |
getOriginForCell | Returns the top, left corner of the given cell. |
function mxMorphing( graph, steps, ease, delay )
Constructs an animation.
graph | Reference to the enclosing mxGraph. |
steps | Optional number of steps in the morphing animation. Default is 6. |
ease | Optional easing constant for the animation. Default is 1.5. |
delay | Optional delay between the animation steps. Passed to mxAnimation. |
mxMorphing.prototype.show = function( move )
Shows the changes in the given mxCellStatePreview.
mxMorphing.prototype.animateCell = function( cell, move, recurse )
Animates the given cell state using mxCellStatePreview.moveState.
Constructs an animation.
function mxMorphing( graph, steps, ease, delay )
Specifies the delay between the animation steps.
mxMorphing.prototype.graph
Specifies the maximum number of steps for the morphing.
mxMorphing.prototype.steps
Contains the current step.
mxMorphing.prototype.step
Ease-off for movement towards the given vector.
mxMorphing.prototype.ease
Optional array of cells to be animated.
mxMorphing.prototype.cells
Animation step.
mxMorphing.prototype.updateAnimation = function()
Shows the changes in the given mxCellStatePreview.
mxMorphing.prototype.show = function( move )
Animates the given cell state using mxCellStatePreview.moveState.
mxMorphing.prototype.animateCell = function( cell, move, recurse )
mxCellStatePreview.prototype.moveState = function( state, dx, dy, add, includeEdges )
Returns true if the animation should not recursively find more deltas for children if the given parent state has been animated.
mxMorphing.prototype.stopRecursion = function( state, delta )
Returns the vector between the current rendered state and the future location of the state after the display will be updated.
mxMorphing.prototype.getDelta = function( state )
Returns the top, left corner of the given cell.
mxMorphing.prototype.getOriginForCell = function( cell )