API  0.9.10
CSSAnimation.j File Reference

Go to the source code of this file.

Variables

CSSAnimation prototype addAnimationEndEventListener
 
var ANIMATION_DURATION_PROPERTY
 
var ANIMATION_END_EVENT_NAME
 
var ANIMATION_FILL_MODE_PROPERTY
 
var ANIMATION_KEYFRAMES_RULE
 
var ANIMATION_NAME_PROPERTY
 
var ANIMATION_PROPERTY
 
var ANIMATION_TIMING_FUNCTION_PROPERTY
 
var ANIMATIONS_GLOBAL_ID = 0
 
CSSAnimation prototype appendKeyFramesRule
 
CSSAnimation prototype buildDOMElements
 
CSSAnimation prototype completionFunctionForAnimationName
 
CSSAnimation prototype createKeyFramesStyleElement
 
 CSSAnimation
 
var CURRENT_ANIMATIONS = {}
 
var defineCSSProperties
 
CSSAnimation prototype description
 
CSSAnimation prototype endEventListener
 
CSSAnimation prototype keyFrames
 
var removeFromParent
 
CSSAnimation prototype setTargetStyleProperties
 
CSSAnimation prototype start
 

Variable Documentation

◆ addAnimationEndEventListener

CSSAnimation prototype addAnimationEndEventListener
Initial value:
= function()
{
var listener = this.endEventListener();
this.target.addEventListener(ANIMATION_END_EVENT_NAME, listener, false);
}
CSSAnimation prototype endEventListener
Definition: CSSAnimation.j:189
var ANIMATION_END_EVENT_NAME
Definition: CSSAnimation.j:3

Definition at line 262 of file CSSAnimation.j.

◆ ANIMATION_DURATION_PROPERTY

var ANIMATION_DURATION_PROPERTY

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATION_END_EVENT_NAME

var ANIMATION_END_EVENT_NAME

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATION_FILL_MODE_PROPERTY

var ANIMATION_FILL_MODE_PROPERTY

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATION_KEYFRAMES_RULE

var ANIMATION_KEYFRAMES_RULE

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATION_NAME_PROPERTY

var ANIMATION_NAME_PROPERTY

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATION_PROPERTY

var ANIMATION_PROPERTY

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATION_TIMING_FUNCTION_PROPERTY

var ANIMATION_TIMING_FUNCTION_PROPERTY

Definition at line 3 of file CSSAnimation.j.

◆ ANIMATIONS_GLOBAL_ID

var ANIMATIONS_GLOBAL_ID = 0

Definition at line 2 of file CSSAnimation.j.

◆ appendKeyFramesRule

CSSAnimation prototype appendKeyFramesRule
Initial value:
= function()
{
var styleElement = this.createKeyFramesStyleElement(),
keyframesText = this.keyFrames(),
nodeText = document.createTextNode(keyframesText);
styleElement.appendChild(nodeText);
document.head.appendChild(styleElement);
}
CSSAnimation prototype createKeyFramesStyleElement
Definition: CSSAnimation.j:175
CSSAnimation prototype keyFrames
Definition: CSSAnimation.j:117

Definition at line 165 of file CSSAnimation.j.

◆ buildDOMElements

CSSAnimation prototype buildDOMElements
Initial value:
= function()
{
this.didBuildDOMElements = true;
}
CSSAnimation prototype addAnimationEndEventListener
Definition: CSSAnimation.j:262
CSSAnimation prototype appendKeyFramesRule
Definition: CSSAnimation.j:165
CSSAnimation prototype setTargetStyleProperties
Definition: CSSAnimation.j:269

Definition at line 284 of file CSSAnimation.j.

◆ completionFunctionForAnimationName

CSSAnimation prototype completionFunctionForAnimationName
Initial value:
= function(aName)
{
var propanims = this.propertyanimations,
count = propanims.length;
while (count--)
{
var anim = propanims[count];
if (anim.name === aName)
return anim.completionfunction;
}
return null;
}

Definition at line 246 of file CSSAnimation.j.

◆ createKeyFramesStyleElement

CSSAnimation prototype createKeyFramesStyleElement
Initial value:
= function()
{
if (!this.styleElement)
{
var styleElement = document.createElement("style");
styleElement.setAttribute("type", "text/css");
this.styleElement = styleElement;
}
return this.styleElement;
}

Definition at line 175 of file CSSAnimation.j.

◆ CSSAnimation

CSSAnimation

Definition at line 37 of file CSSAnimation.j.

◆ CURRENT_ANIMATIONS

var CURRENT_ANIMATIONS = {}

Definition at line 3 of file CSSAnimation.j.

◆ defineCSSProperties

var defineCSSProperties
Initial value:
= function()
{
if (this.done)
return;
ANIMATION_KEYFRAMES_RULE = "@" + ANIMATION_PROPERTY.substring(0, ANIMATION_PROPERTY.indexOf("animation")) + "keyframes";
this.done = true;
}
var ANIMATION_NAME_PROPERTY
Definition: CSSAnimation.j:3
function CPBrowserCSSProperty(aProperty)
var ANIMATION_FILL_MODE_PROPERTY
Definition: CSSAnimation.j:3
var ANIMATION_TIMING_FUNCTION_PROPERTY
Definition: CSSAnimation.j:3
var ANIMATION_PROPERTY
Definition: CSSAnimation.j:3
function CPBrowserStyleProperty(aProperty)
var ANIMATION_END_EVENT_NAME
Definition: CSSAnimation.j:3
var ANIMATION_DURATION_PROPERTY
Definition: CSSAnimation.j:3
var ANIMATION_KEYFRAMES_RULE
Definition: CSSAnimation.j:3

Definition at line 13 of file CSSAnimation.j.

◆ description

CSSAnimation prototype description

Definition at line 73 of file CSSAnimation.j.

◆ endEventListener

CSSAnimation prototype endEventListener

Definition at line 189 of file CSSAnimation.j.

◆ keyFrames

CSSAnimation prototype keyFrames

Definition at line 117 of file CSSAnimation.j.

◆ removeFromParent

var removeFromParent
Initial value:
= function(aNode)
{
var parentNode = aNode.parentNode;
if (parentNode)
parentNode.removeChild(aNode);
}

Definition at line 29 of file CSSAnimation.j.

◆ setTargetStyleProperties

CSSAnimation prototype setTargetStyleProperties
Initial value:
= function()
{
var style = this.target.style;
if (this.animationstimingfunctions.length)
style.setProperty(ANIMATION_TIMING_FUNCTION_PROPERTY, this.animationstimingfunctions.join(","));
style.setProperty(ANIMATION_DURATION_PROPERTY, this.animationsdurations.join(","));
style.setProperty(ANIMATION_FILL_MODE_PROPERTY, "forwards");
style.setProperty("-webkit-backface-visibility", "hidden");
}
var ANIMATION_FILL_MODE_PROPERTY
Definition: CSSAnimation.j:3
var ANIMATION_TIMING_FUNCTION_PROPERTY
Definition: CSSAnimation.j:3
var ANIMATION_DURATION_PROPERTY
Definition: CSSAnimation.j:3

Definition at line 269 of file CSSAnimation.j.

◆ start

CSSAnimation prototype start
Initial value:
= function()
{
if (this.propertyanimations.length === 0 || this.islive)
return false;
if (!this.didBuildDOMElements)
this.target.style.setProperty(ANIMATION_NAME_PROPERTY, this.animationsnames.join(","));
this.islive = true;
return true;
}
var ANIMATION_NAME_PROPERTY
Definition: CSSAnimation.j:3
CSSAnimation prototype buildDOMElements
Definition: CSSAnimation.j:284

Definition at line 295 of file CSSAnimation.j.