Module: TSUI.Animation
Extends: None
Implements: None
Exported: Yes

Associated source files:


Provides functions for animation including preparing and destroying canvases for HTML2Canvas animation.

Private Static Methods

PrepareHTML2CanvasForAnimation(elem: JQuery, callback: (canvas: JQuery) => void): void
Takes an jQuery element (must be contained within the actual page DOM) and prepares it for HTML2Cnavas animation.It does not overlay the canvas on top of the original element but does attempt to position it so it can be faded in.Calls the callback once the canvas has been generated.
  • elem: JQuery - The element to generate an image of.
  • callback: (canvas: JQuery) => void - The callback to invoke once the canvas has been generated. Context is not retained.
  • Returns: void -
RestoreAfterAnimationHTML2Canvas(elem: JQuery, canvas: JQuery): void
Restores the original element after HTML2Canvas is no longer required.Fades in the element over the top of the canvas then quickly fades out the canvas from underneath.Canvas is then destroyed.
  • elem: JQuery - The element (JQuery reference) to restore.
  • canvas: JQuery - The canvas (JQuery reference) that is an image of the element. Must already be positioned on top of the element.
  • Returns: void -

Last edited Aug 24, 2013 at 6:10 PM by EdwardNutting, version 3


No comments yet.