update animation library "velocity"

This commit is contained in:
Felix Niklas 2015-01-15 01:12:52 +01:00
parent d5419fcf22
commit 5c14424437
2 changed files with 203 additions and 121 deletions

File diff suppressed because one or more lines are too long

View file

@ -2,48 +2,77 @@
Velocity UI Pack Velocity UI Pack
**********************/ **********************/
/* VelocityJS.org UI Pack (4.1.4). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */ /* VelocityJS.org UI Pack (5.0.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License. Portions copyright Daniel Eden, Christian Pucci. */
;(function (factory) { ;(function (factory) {
/* CommonJS module. */ /* CommonJS module. */
if (typeof module === "object" && typeof module.exports === "object") { if (typeof require === "function" && typeof exports === "object" ) {
module.exports = factory(); module.exports = factory();
/* AMD module. */ /* AMD module. */
} else if (typeof define === "function" && define.amd) { } else if (typeof define === "function" && define.amd) {
define([ "velocity" ], factory); define([ "velocity" ], factory);
/* Browser globals. */ /* Browser globals. */
} else { } else {
factory(); factory();
} }
}(function() { }(function() {
return function (global, window, document, undefined) { return function (global, window, document, undefined) {
/************** /*************
Checks Checks
**************/ *************/
if (!global.Velocity || !global.Velocity.Utilities) { if (!global.Velocity || !global.Velocity.Utilities) {
window.console && console.log("Velocity UI Pack: Velocity must be loaded first. Aborting."); window.console && console.log("Velocity UI Pack: Velocity must be loaded first. Aborting.");
return; return;
} else if (!global.Velocity.version || (global.Velocity.version.major <= 0 && global.Velocity.version.minor <= 11 && global.Velocity.version.patch < 8)) { } else {
var abortError = "Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity."; var Velocity = global.Velocity,
$ = Velocity.Utilities;
}
var velocityVersion = Velocity.version,
requiredVersion = { major: 1, minor: 1, patch: 0 };
function greaterSemver (primary, secondary) {
var versionInts = [];
if (!primary || !secondary) { return false; }
$.each([ primary, secondary ], function(i, versionObject) {
var versionIntsComponents = [];
$.each(versionObject, function(component, value) {
while (value.toString().length < 5) {
value = "0" + value;
}
versionIntsComponents.push(value);
});
versionInts.push(versionIntsComponents.join(""))
});
return (parseFloat(versionInts[0]) > parseFloat(versionInts[1]));
}
if (greaterSemver(requiredVersion, velocityVersion)){
var abortError = "Velocity UI Pack: You need to update Velocity (jquery.velocity.js) to a newer version. Visit http://github.com/julianshapiro/velocity.";
alert(abortError); alert(abortError);
throw new Error(abortError); throw new Error(abortError);
} }
/****************** /************************
Register UI Effect Registration
******************/ ************************/
global.Velocity.RegisterUI = function (effectName, properties) { /* Note: RegisterUI is a legacy name. */
Velocity.RegisterEffect = Velocity.RegisterUI = function (effectName, properties) {
/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */ /* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */
function animateParentHeight (elements, direction, totalDuration, stagger) { function animateParentHeight (elements, direction, totalDuration, stagger) {
var totalHeightDelta = 0, var totalHeightDelta = 0,
parentNode; parentNode;
/* Sum the total height (including padding and margin) of all targeted elements. */ /* Sum the total height (including padding and margin) of all targeted elements. */
global.Velocity.Utilities.each(elements.nodeType ? [ elements ] : elements, function(i, element) { $.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
if (stagger) { if (stagger) {
/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */ /* Increase the totalDuration by the successive delay amounts produced by the stagger option. */
totalDuration += i * stagger; totalDuration += i * stagger;
@ -51,84 +80,99 @@ return function (global, window, document, undefined) {
parentNode = element.parentNode; parentNode = element.parentNode;
global.Velocity.Utilities.each([ "height", "paddingTop", "paddingBottom", "marginTop", "marginBottom"], function(i, property) { $.each([ "height", "paddingTop", "paddingBottom", "marginTop", "marginBottom"], function(i, property) {
totalHeightDelta += parseFloat(global.Velocity.CSS.getPropertyValue(element, property)); totalHeightDelta += parseFloat(Velocity.CSS.getPropertyValue(element, property));
}); });
}); });
/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */ /* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */
global.Velocity.animate( Velocity.animate(
parentNode, parentNode,
{ height: (direction === "In" ? "+" : "-") + "=" + totalHeightDelta }, { height: (direction === "In" ? "+" : "-") + "=" + totalHeightDelta },
{ queue: false, easing: "ease-in-out", duration: totalDuration * (direction === "In" ? 0.6 : 1) } { queue: false, easing: "ease-in-out", duration: totalDuration * (direction === "In" ? 0.6 : 1) }
); );
} }
/* Register a custom sequence for each effect. */ /* Register a custom redirect for each effect. */
global.Velocity.Sequences[effectName] = function (element, sequenceOptions, elementsIndex, elementsSize, elements, promiseData) { Velocity.Redirects[effectName] = function (element, redirectOptions, elementsIndex, elementsSize, elements, promiseData) {
var finalElement = (elementsIndex === elementsSize - 1); var finalElement = (elementsIndex === elementsSize - 1);
if (typeof properties.defaultDuration === "function") {
properties.defaultDuration = properties.defaultDuration.call(elements, elements);
} else {
properties.defaultDuration = parseFloat(properties.defaultDuration);
}
/* Iterate through each effect's call array. */ /* Iterate through each effect's call array. */
for (var callIndex = 0; callIndex < properties.calls.length; callIndex++) { for (var callIndex = 0; callIndex < properties.calls.length; callIndex++) {
var call = properties.calls[callIndex], var call = properties.calls[callIndex],
propertyMap = call[0], propertyMap = call[0],
sequenceDuration = (sequenceOptions.duration || properties.defaultDuration || 1000), redirectDuration = (redirectOptions.duration || properties.defaultDuration || 1000),
durationPercentage = call[1], durationPercentage = call[1],
callOptions = call[2] || {}, callOptions = call[2] || {},
opts = {}; opts = {};
/* Assign the whitelisted per-call options. */ /* Assign the whitelisted per-call options. */
opts.duration = sequenceDuration * (durationPercentage || 1); opts.duration = redirectDuration * (durationPercentage || 1);
opts.queue = sequenceOptions.queue || ""; opts.queue = redirectOptions.queue || "";
opts.easing = callOptions.easing || "ease"; opts.easing = callOptions.easing || "ease";
opts.delay = callOptions.delay || 0; opts.delay = parseFloat(callOptions.delay) || 0;
opts._cacheValues = callOptions._cacheValues || true; opts._cacheValues = callOptions._cacheValues || true;
/* Special processing for the first effect call. */ /* Special processing for the first effect call. */
if (callIndex === 0) { if (callIndex === 0) {
/* If a delay was passed into the sequence, combine it with the first call's delay. */ /* If a delay was passed into the redirect, combine it with the first call's delay. */
opts.delay += (sequenceOptions.delay || 0); opts.delay += (parseFloat(redirectOptions.delay) || 0);
if (elementsIndex === 0) { if (elementsIndex === 0) {
opts.begin = function() { opts.begin = function() {
/* Only trigger a begin callback on the first effect call with the first element in the set. */ /* Only trigger a begin callback on the first effect call with the first element in the set. */
sequenceOptions.begin && sequenceOptions.begin.call(elements, elements); redirectOptions.begin && redirectOptions.begin.call(elements, elements);
var direction = effectName.match(/(In|Out)$/);
/* Make "in" transitioning elements invisible immediately so that there's no FOUC between now
and the first RAF tick. */
if ((direction && direction[0] === "In") && propertyMap.opacity !== undefined) {
$.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
Velocity.CSS.setPropertyValue(element, "opacity", 0);
});
}
/* Only trigger animateParentHeight() if we're using an In/Out transition. */ /* Only trigger animateParentHeight() if we're using an In/Out transition. */
var direction = effectName.match(/(In|Out)$/); if (redirectOptions.animateParentHeight && direction) {
if (sequenceOptions.animateParentHeight && direction) { animateParentHeight(elements, direction[0], redirectDuration + opts.delay, redirectOptions.stagger);
animateParentHeight(elements, direction[0], sequenceDuration + opts.delay, sequenceOptions.stagger);
} }
} }
} }
/* If the user isn't overriding the display option, default to "auto" for "In"-suffixed transitions. */ /* If the user isn't overriding the display option, default to "auto" for "In"-suffixed transitions. */
if (sequenceOptions.display !== null) { if (redirectOptions.display !== null) {
if (sequenceOptions.display !== undefined && sequenceOptions.display !== "none") { if (redirectOptions.display !== undefined && redirectOptions.display !== "none") {
opts.display = sequenceOptions.display; opts.display = redirectOptions.display;
} else if (/In$/.test(effectName)) { } else if (/In$/.test(effectName)) {
/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */ /* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */
var defaultDisplay = global.Velocity.CSS.Values.getDisplayType(element); var defaultDisplay = Velocity.CSS.Values.getDisplayType(element);
opts.display = (defaultDisplay === "inline") ? "inline-block" : defaultDisplay; opts.display = (defaultDisplay === "inline") ? "inline-block" : defaultDisplay;
} }
} }
if (sequenceOptions.visibility && sequenceOptions.visibility !== "hidden") { if (redirectOptions.visibility && redirectOptions.visibility !== "hidden") {
opts.visibility = sequenceOptions.visibility; opts.visibility = redirectOptions.visibility;
} }
} }
/* Special processing for the last effect call. */ /* Special processing for the last effect call. */
if (callIndex === properties.calls.length - 1) { if (callIndex === properties.calls.length - 1) {
/* Append promise resolving onto the user's sequence callback. */ /* Append promise resolving onto the user's redirect callback. */
function injectFinalCallbacks () { function injectFinalCallbacks () {
if ((sequenceOptions.display === undefined || sequenceOptions.display === "none") && /Out$/.test(effectName)) { if ((redirectOptions.display === undefined || redirectOptions.display === "none") && /Out$/.test(effectName)) {
global.Velocity.Utilities.each(elements.nodeType ? [ elements ] : elements, function(i, element) { $.each(elements.nodeType ? [ elements ] : elements, function(i, element) {
global.Velocity.CSS.setPropertyValue(element, "display", "none"); Velocity.CSS.setPropertyValue(element, "display", "none");
}); });
} }
sequenceOptions.complete && sequenceOptions.complete.call(elements, elements); redirectOptions.complete && redirectOptions.complete.call(elements, elements);
if (promiseData) { if (promiseData) {
promiseData.resolver(elements || element); promiseData.resolver(elements || element);
@ -142,7 +186,8 @@ return function (global, window, document, undefined) {
/* Format each non-array value in the reset property map to [ value, value ] so that changes apply /* Format each non-array value in the reset property map to [ value, value ] so that changes apply
immediately and DOM querying is avoided (via forcefeeding). */ immediately and DOM querying is avoided (via forcefeeding). */
if (typeof resetValue === "string" || typeof resetValue === "number") { /* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */
if (Velocity.CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === "string" || typeof resetValue === "number")) {
properties.reset[resetProperty] = [ properties.reset[resetProperty], properties.reset[resetProperty] ]; properties.reset[resetProperty] = [ properties.reset[resetProperty], properties.reset[resetProperty] ];
} }
} }
@ -153,26 +198,26 @@ return function (global, window, document, undefined) {
/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */ /* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */
if (finalElement) { if (finalElement) {
resetOptions.complete = injectFinalCallbacks; resetOptions.complete = injectFinalCallbacks;
} }
global.Velocity.animate(element, properties.reset, resetOptions); Velocity.animate(element, properties.reset, resetOptions);
/* Only trigger the user's complete callback on the last effect call with the last element in the set. */ /* Only trigger the user's complete callback on the last effect call with the last element in the set. */
} else if (finalElement) { } else if (finalElement) {
injectFinalCallbacks(); injectFinalCallbacks();
} }
}; };
if (sequenceOptions.visibility === "hidden") { if (redirectOptions.visibility === "hidden") {
opts.visibility = sequenceOptions.visibility; opts.visibility = redirectOptions.visibility;
} }
} }
global.Velocity.animate(element, propertyMap, opts); Velocity.animate(element, propertyMap, opts);
} }
}; };
/* Return the Velocity object so that RegisterUI calls can be chained. */ /* Return the Velocity object so that RegisterUI calls can be chained. */
return global.Velocity; return Velocity;
}; };
/********************* /*********************
@ -181,8 +226,8 @@ return function (global, window, document, undefined) {
/* Externalize the packagedEffects data so that they can optionally be modified and re-registered. */ /* Externalize the packagedEffects data so that they can optionally be modified and re-registered. */
/* Support: <=IE8: Callouts will have no effect, and transitions will simply fade in/out. IE9/Android 2.3: Most effects are fully supported, the rest fade in/out. All other browsers: full support. */ /* Support: <=IE8: Callouts will have no effect, and transitions will simply fade in/out. IE9/Android 2.3: Most effects are fully supported, the rest fade in/out. All other browsers: full support. */
global.Velocity.RegisterUI.packagedEffects = Velocity.RegisterEffect.packagedEffects =
{ {
/* Animate.css */ /* Animate.css */
"callout.bounce": { "callout.bounce": {
defaultDuration: 550, defaultDuration: 550,
@ -196,7 +241,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"callout.shake": { "callout.shake": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { translateX: -11 }, 0.125 ], [ { translateX: -11 }, 0.125 ],
[ { translateX: 11 }, 0.125 ], [ { translateX: 11 }, 0.125 ],
[ { translateX: -11 }, 0.125 ], [ { translateX: -11 }, 0.125 ],
@ -210,7 +255,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"callout.flash": { "callout.flash": {
defaultDuration: 1100, defaultDuration: 1100,
calls: [ calls: [
[ { opacity: [ 0, "easeInOutQuad", 1 ] }, 0.25 ], [ { opacity: [ 0, "easeInOutQuad", 1 ] }, 0.25 ],
[ { opacity: [ 1, "easeInOutQuad" ] }, 0.25 ], [ { opacity: [ 1, "easeInOutQuad" ] }, 0.25 ],
[ { opacity: [ 0, "easeInOutQuad" ] }, 0.25 ], [ { opacity: [ 0, "easeInOutQuad" ] }, 0.25 ],
@ -220,15 +265,15 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"callout.pulse": { "callout.pulse": {
defaultDuration: 825, defaultDuration: 825,
calls: [ calls: [
[ { scaleX: 1.1, scaleY: 1.1 }, 0.50 ], [ { scaleX: 1.1, scaleY: 1.1 }, 0.50, { easing: "easeInExpo" } ],
[ { scaleX: 1, scaleY: 1 }, 0.50 ] [ { scaleX: 1, scaleY: 1 }, 0.50 ]
] ]
}, },
/* Animate.css */ /* Animate.css */
"callout.swing": { "callout.swing": {
defaultDuration: 950, defaultDuration: 950,
calls: [ calls: [
[ { rotateZ: 15 }, 0.20 ], [ { rotateZ: 15 }, 0.20 ],
[ { rotateZ: -10 }, 0.20 ], [ { rotateZ: -10 }, 0.20 ],
[ { rotateZ: 5 }, 0.20 ], [ { rotateZ: 5 }, 0.20 ],
@ -239,7 +284,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"callout.tada": { "callout.tada": {
defaultDuration: 1000, defaultDuration: 1000,
calls: [ calls: [
[ { scaleX: 0.9, scaleY: 0.9, rotateZ: -3 }, 0.10 ], [ { scaleX: 0.9, scaleY: 0.9, rotateZ: -3 }, 0.10 ],
[ { scaleX: 1.1, scaleY: 1.1, rotateZ: 3 }, 0.10 ], [ { scaleX: 1.1, scaleY: 1.1, rotateZ: 3 }, 0.10 ],
[ { scaleX: 1.1, scaleY: 1.1, rotateZ: -3 }, 0.10 ], [ { scaleX: 1.1, scaleY: 1.1, rotateZ: -3 }, 0.10 ],
@ -266,7 +311,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipXIn": { "transition.flipXIn": {
defaultDuration: 700, defaultDuration: 700,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateY: [ 0, -55 ] } ] [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateY: [ 0, -55 ] } ]
], ],
reset: { transformPerspective: 0 } reset: { transformPerspective: 0 }
@ -274,7 +319,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipXOut": { "transition.flipXOut": {
defaultDuration: 700, defaultDuration: 700,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateY: 55 } ] [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateY: 55 } ]
], ],
reset: { transformPerspective: 0, rotateY: 0 } reset: { transformPerspective: 0, rotateY: 0 }
@ -282,7 +327,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipYIn": { "transition.flipYIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateX: [ 0, -45 ] } ] [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], rotateX: [ 0, -45 ] } ]
], ],
reset: { transformPerspective: 0 } reset: { transformPerspective: 0 }
@ -290,7 +335,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipYOut": { "transition.flipYOut": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateX: 25 } ] [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], rotateX: 25 } ]
], ],
reset: { transformPerspective: 0, rotateX: 0 } reset: { transformPerspective: 0, rotateX: 0 }
@ -299,7 +344,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceXIn": { "transition.flipBounceXIn": {
defaultDuration: 900, defaultDuration: 900,
calls: [ calls: [
[ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateY: [ -10, 90 ] }, 0.50 ], [ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateY: [ -10, 90 ] }, 0.50 ],
[ { opacity: 0.80, rotateY: 10 }, 0.25 ], [ { opacity: 0.80, rotateY: 10 }, 0.25 ],
[ { opacity: 1, rotateY: 0 }, 0.25 ] [ { opacity: 1, rotateY: 0 }, 0.25 ]
@ -310,7 +355,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceXOut": { "transition.flipBounceXOut": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateY: -10 }, 0.50 ], [ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateY: -10 }, 0.50 ],
[ { opacity: 0, rotateY: 90 }, 0.50 ] [ { opacity: 0, rotateY: 90 }, 0.50 ]
], ],
@ -320,7 +365,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceYIn": { "transition.flipBounceYIn": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateX: [ -10, 90 ] }, 0.50 ], [ { opacity: [ 0.725, 0 ], transformPerspective: [ 400, 400 ], rotateX: [ -10, 90 ] }, 0.50 ],
[ { opacity: 0.80, rotateX: 10 }, 0.25 ], [ { opacity: 0.80, rotateX: 10 }, 0.25 ],
[ { opacity: 1, rotateX: 0 }, 0.25 ] [ { opacity: 1, rotateX: 0 }, 0.25 ]
@ -331,7 +376,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.flipBounceYOut": { "transition.flipBounceYOut": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateX: -15 }, 0.50 ], [ { opacity: [ 0.9, 1 ], transformPerspective: [ 400, 400 ], rotateX: -15 }, 0.50 ],
[ { opacity: 0, rotateX: 90 }, 0.50 ] [ { opacity: 0, rotateX: 90 }, 0.50 ]
], ],
@ -340,7 +385,7 @@ return function (global, window, document, undefined) {
/* Magic.css */ /* Magic.css */
"transition.swoopIn": { "transition.swoopIn": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "100%", "50%" ], transformOriginY: [ "100%", "100%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], translateX: [ 0, -700 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], transformOriginX: [ "100%", "50%" ], transformOriginY: [ "100%", "100%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], translateX: [ 0, -700 ], translateZ: 0 } ]
], ],
reset: { transformOriginX: "50%", transformOriginY: "50%" } reset: { transformOriginX: "50%", transformOriginY: "50%" }
@ -348,7 +393,7 @@ return function (global, window, document, undefined) {
/* Magic.css */ /* Magic.css */
"transition.swoopOut": { "transition.swoopOut": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "100%" ], transformOriginY: [ "100%", "100%" ], scaleX: 0, scaleY: 0, translateX: -700, translateZ: 0 } ] [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "100%" ], transformOriginY: [ "100%", "100%" ], scaleX: 0, scaleY: 0, translateX: -700, translateZ: 0 } ]
], ],
reset: { transformOriginX: "50%", transformOriginY: "50%", scaleX: 1, scaleY: 1, translateX: 0 } reset: { transformOriginX: "50%", transformOriginY: "50%", scaleX: 1, scaleY: 1, translateX: 0 }
@ -356,42 +401,42 @@ return function (global, window, document, undefined) {
/* Magic.css */ /* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */ /* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
"transition.whirlIn": { "transition.whirlIn": {
defaultDuration: 900, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], rotateY: [ 0, 160 ] } ] [ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0 ], scaleY: [ 1, 0 ], rotateY: [ 0, 160 ] }, 1, { easing: "easeInOutSine" } ]
] ]
}, },
/* Magic.css */ /* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */ /* Support: Loses rotation in IE9/Android 2.3. (Fades and scales only.) */
"transition.whirlOut": { "transition.whirlOut": {
defaultDuration: 900, defaultDuration: 750,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0, scaleY: 0, rotateY: 160 } ] [ { opacity: [ 0, "easeInOutQuint", 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0, scaleY: 0, rotateY: 160 }, 1, { easing: "swing" } ]
], ],
reset: { scaleX: 1, scaleY: 1, rotateY: 0 } reset: { scaleX: 1, scaleY: 1, rotateY: 0 }
}, },
"transition.shrinkIn": { "transition.shrinkIn": {
defaultDuration: 700, defaultDuration: 750,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 1.5 ], scaleY: [ 1, 1.5 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 1.5 ], scaleY: [ 1, 1.5 ], translateZ: 0 } ]
] ]
}, },
"transition.shrinkOut": { "transition.shrinkOut": {
defaultDuration: 650, defaultDuration: 600,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 1.3, scaleY: 1.3, translateZ: 0 } ] [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 1.3, scaleY: 1.3, translateZ: 0 } ]
], ],
reset: { scaleX: 1, scaleY: 1 } reset: { scaleX: 1, scaleY: 1 }
}, },
"transition.expandIn": { "transition.expandIn": {
defaultDuration: 700, defaultDuration: 700,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0.625 ], scaleY: [ 1, 0.625 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: [ 1, 0.625 ], scaleY: [ 1, 0.625 ], translateZ: 0 } ]
] ]
}, },
"transition.expandOut": { "transition.expandOut": {
defaultDuration: 700, defaultDuration: 700,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0.5, scaleY: 0.5, translateZ: 0 } ] [ { opacity: [ 0, 1 ], transformOriginX: [ "50%", "50%" ], transformOriginY: [ "50%", "50%" ], scaleX: 0.5, scaleY: 0.5, translateZ: 0 } ]
], ],
reset: { scaleX: 1, scaleY: 1 } reset: { scaleX: 1, scaleY: 1 }
@ -399,7 +444,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceIn": { "transition.bounceIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], scaleX: [ 1.05, 0.3 ], scaleY: [ 1.05, 0.3 ] }, 0.40 ], [ { opacity: [ 1, 0 ], scaleX: [ 1.05, 0.3 ], scaleY: [ 1.05, 0.3 ] }, 0.40 ],
[ { scaleX: 0.9, scaleY: 0.9, translateZ: 0 }, 0.20 ], [ { scaleX: 0.9, scaleY: 0.9, translateZ: 0 }, 0.20 ],
[ { scaleX: 1, scaleY: 1 }, 0.50 ] [ { scaleX: 1, scaleY: 1 }, 0.50 ]
@ -408,17 +453,17 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceOut": { "transition.bounceOut": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { scaleX: 0.95, scaleY: 0.95 }, 0.40 ], [ { scaleX: 0.95, scaleY: 0.95 }, 0.35 ],
[ { scaleX: 1.1, scaleY: 1.1, translateZ: 0 }, 0.40 ], [ { scaleX: 1.1, scaleY: 1.1, translateZ: 0 }, 0.35 ],
[ { opacity: [ 0, 1 ], scaleX: 0.3, scaleY: 0.3 }, 0.20 ] [ { opacity: [ 0, 1 ], scaleX: 0.3, scaleY: 0.3 }, 0.30 ]
], ],
reset: { scaleX: 1, scaleY: 1 } reset: { scaleX: 1, scaleY: 1 }
}, },
/* Animate.css */ /* Animate.css */
"transition.bounceUpIn": { "transition.bounceUpIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateY: [ -30, 1000 ] }, 0.60, { easing: "easeOutCirc" } ], [ { opacity: [ 1, 0 ], translateY: [ -30, 1000 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateY: 10 }, 0.20 ], [ { translateY: 10 }, 0.20 ],
[ { translateY: 0 }, 0.20 ] [ { translateY: 0 }, 0.20 ]
@ -427,7 +472,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceUpOut": { "transition.bounceUpOut": {
defaultDuration: 1000, defaultDuration: 1000,
calls: [ calls: [
[ { translateY: 20 }, 0.20 ], [ { translateY: 20 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateY: -1000 }, 0.80 ] [ { opacity: [ 0, "easeInCirc", 1 ], translateY: -1000 }, 0.80 ]
], ],
@ -436,7 +481,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceDownIn": { "transition.bounceDownIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateY: [ 30, -1000 ] }, 0.60, { easing: "easeOutCirc" } ], [ { opacity: [ 1, 0 ], translateY: [ 30, -1000 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateY: -10 }, 0.20 ], [ { translateY: -10 }, 0.20 ],
[ { translateY: 0 }, 0.20 ] [ { translateY: 0 }, 0.20 ]
@ -445,7 +490,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceDownOut": { "transition.bounceDownOut": {
defaultDuration: 1000, defaultDuration: 1000,
calls: [ calls: [
[ { translateY: -20 }, 0.20 ], [ { translateY: -20 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateY: 1000 }, 0.80 ] [ { opacity: [ 0, "easeInCirc", 1 ], translateY: 1000 }, 0.80 ]
], ],
@ -454,7 +499,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceLeftIn": { "transition.bounceLeftIn": {
defaultDuration: 750, defaultDuration: 750,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateX: [ 30, -1250 ] }, 0.60, { easing: "easeOutCirc" } ], [ { opacity: [ 1, 0 ], translateX: [ 30, -1250 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateX: -10 }, 0.20 ], [ { translateX: -10 }, 0.20 ],
[ { translateX: 0 }, 0.20 ] [ { translateX: 0 }, 0.20 ]
@ -463,7 +508,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceLeftOut": { "transition.bounceLeftOut": {
defaultDuration: 750, defaultDuration: 750,
calls: [ calls: [
[ { translateX: 30 }, 0.20 ], [ { translateX: 30 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateX: -1250 }, 0.80 ] [ { opacity: [ 0, "easeInCirc", 1 ], translateX: -1250 }, 0.80 ]
], ],
@ -472,7 +517,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceRightIn": { "transition.bounceRightIn": {
defaultDuration: 750, defaultDuration: 750,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateX: [ -30, 1250 ] }, 0.60, { easing: "easeOutCirc" } ], [ { opacity: [ 1, 0 ], translateX: [ -30, 1250 ] }, 0.60, { easing: "easeOutCirc" } ],
[ { translateX: 10 }, 0.20 ], [ { translateX: 10 }, 0.20 ],
[ { translateX: 0 }, 0.20 ] [ { translateX: 0 }, 0.20 ]
@ -481,7 +526,7 @@ return function (global, window, document, undefined) {
/* Animate.css */ /* Animate.css */
"transition.bounceRightOut": { "transition.bounceRightOut": {
defaultDuration: 750, defaultDuration: 750,
calls: [ calls: [
[ { translateX: -30 }, 0.20 ], [ { translateX: -30 }, 0.20 ],
[ { opacity: [ 0, "easeInCirc", 1 ], translateX: 1250 }, 0.80 ] [ { opacity: [ 0, "easeInCirc", 1 ], translateX: 1250 }, 0.80 ]
], ],
@ -489,104 +534,104 @@ return function (global, window, document, undefined) {
}, },
"transition.slideUpIn": { "transition.slideUpIn": {
defaultDuration: 900, defaultDuration: 900,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, 20 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateY: [ 0, 20 ], translateZ: 0 } ]
] ]
}, },
"transition.slideUpOut": { "transition.slideUpOut": {
defaultDuration: 900, defaultDuration: 900,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateY: -20, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateY: -20, translateZ: 0 } ]
], ],
reset: { translateY: 0 } reset: { translateY: 0 }
}, },
"transition.slideDownIn": { "transition.slideDownIn": {
defaultDuration: 900, defaultDuration: 900,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, -20 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateY: [ 0, -20 ], translateZ: 0 } ]
] ]
}, },
"transition.slideDownOut": { "transition.slideDownOut": {
defaultDuration: 900, defaultDuration: 900,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateY: 20, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateY: 20, translateZ: 0 } ]
], ],
reset: { translateY: 0 } reset: { translateY: 0 }
}, },
"transition.slideLeftIn": { "transition.slideLeftIn": {
defaultDuration: 1000, defaultDuration: 1000,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, -20 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateX: [ 0, -20 ], translateZ: 0 } ]
] ]
}, },
"transition.slideLeftOut": { "transition.slideLeftOut": {
defaultDuration: 1050, defaultDuration: 1050,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateX: -20, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateX: -20, translateZ: 0 } ]
], ],
reset: { translateX: 0 } reset: { translateX: 0 }
}, },
"transition.slideRightIn": { "transition.slideRightIn": {
defaultDuration: 1000, defaultDuration: 1000,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, 20 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateX: [ 0, 20 ], translateZ: 0 } ]
] ]
}, },
"transition.slideRightOut": { "transition.slideRightOut": {
defaultDuration: 1050, defaultDuration: 1050,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateX: 20, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateX: 20, translateZ: 0 } ]
], ],
reset: { translateX: 0 } reset: { translateX: 0 }
}, },
"transition.slideUpBigIn": { "transition.slideUpBigIn": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, 75 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateY: [ 0, 75 ], translateZ: 0 } ]
] ]
}, },
"transition.slideUpBigOut": { "transition.slideUpBigOut": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateY: -75, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateY: -75, translateZ: 0 } ]
], ],
reset: { translateY: 0 } reset: { translateY: 0 }
}, },
"transition.slideDownBigIn": { "transition.slideDownBigIn": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateY: [ 0, -75 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateY: [ 0, -75 ], translateZ: 0 } ]
] ]
}, },
"transition.slideDownBigOut": { "transition.slideDownBigOut": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateY: 75, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateY: 75, translateZ: 0 } ]
], ],
reset: { translateY: 0 } reset: { translateY: 0 }
}, },
"transition.slideLeftBigIn": { "transition.slideLeftBigIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, -75 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateX: [ 0, -75 ], translateZ: 0 } ]
] ]
}, },
"transition.slideLeftBigOut": { "transition.slideLeftBigOut": {
defaultDuration: 750, defaultDuration: 750,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateX: -75, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateX: -75, translateZ: 0 } ]
], ],
reset: { translateX: 0 } reset: { translateX: 0 }
}, },
"transition.slideRightBigIn": { "transition.slideRightBigIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], translateX: [ 0, 75 ], translateZ: 0 } ] [ { opacity: [ 1, 0 ], translateX: [ 0, 75 ], translateZ: 0 } ]
] ]
}, },
"transition.slideRightBigOut": { "transition.slideRightBigOut": {
defaultDuration: 750, defaultDuration: 750,
calls: [ calls: [
[ { opacity: [ 0, 1 ], translateX: 75, translateZ: 0 } ] [ { opacity: [ 0, 1 ], translateX: 75, translateZ: 0 } ]
], ],
reset: { translateX: 0 } reset: { translateX: 0 }
@ -594,16 +639,15 @@ return function (global, window, document, undefined) {
/* Magic.css */ /* Magic.css */
"transition.perspectiveUpIn": { "transition.perspectiveUpIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: [ 0, -180 ] } ] [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: [ 0, -180 ] } ]
], ]
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
}, },
/* Magic.css */ /* Magic.css */
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveUpOut": { "transition.perspectiveUpOut": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: -180 } ] [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ "100%", "100%" ], rotateX: -180 } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 }
@ -612,7 +656,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveDownIn": { "transition.perspectiveDownIn": {
defaultDuration: 800, defaultDuration: 800,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: [ 0, 180 ] } ] [ { opacity: [ 1, 0 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: [ 0, 180 ] } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
@ -621,7 +665,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveDownOut": { "transition.perspectiveDownOut": {
defaultDuration: 850, defaultDuration: 850,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: 180 } ] [ { opacity: [ 0, 1 ], transformPerspective: [ 800, 800 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateX: 180 } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateX: 0 }
@ -630,7 +674,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveLeftIn": { "transition.perspectiveLeftIn": {
defaultDuration: 950, defaultDuration: 950,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: [ 0, -180 ] } ] [ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: [ 0, -180 ] } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
@ -639,7 +683,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveLeftOut": { "transition.perspectiveLeftOut": {
defaultDuration: 950, defaultDuration: 950,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: -180 } ] [ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ 0, 0 ], transformOriginY: [ 0, 0 ], rotateY: -180 } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 }
@ -648,7 +692,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveRightIn": { "transition.perspectiveRightIn": {
defaultDuration: 950, defaultDuration: 950,
calls: [ calls: [
[ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: [ 0, 180 ] } ] [ { opacity: [ 1, 0 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: [ 0, 180 ] } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%" }
@ -657,7 +701,7 @@ return function (global, window, document, undefined) {
/* Support: Loses rotation in IE9/Android 2.3 (fades only). */ /* Support: Loses rotation in IE9/Android 2.3 (fades only). */
"transition.perspectiveRightOut": { "transition.perspectiveRightOut": {
defaultDuration: 950, defaultDuration: 950,
calls: [ calls: [
[ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: 180 } ] [ { opacity: [ 0, 1 ], transformPerspective: [ 2000, 2000 ], transformOriginX: [ "100%", "100%" ], transformOriginY: [ 0, 0 ], rotateY: 180 } ]
], ],
reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 } reset: { transformPerspective: 0, transformOriginX: "50%", transformOriginY: "50%", rotateY: 0 }
@ -665,8 +709,46 @@ return function (global, window, document, undefined) {
}; };
/* Register the packaged effects. */ /* Register the packaged effects. */
for (var effectName in global.Velocity.RegisterUI.packagedEffects) { for (var effectName in Velocity.RegisterEffect.packagedEffects) {
global.Velocity.RegisterUI(effectName, global.Velocity.RegisterUI.packagedEffects[effectName]); Velocity.RegisterEffect(effectName, Velocity.RegisterEffect.packagedEffects[effectName]);
} }
/*********************
Sequence Running
**********************/
/* Note: Sequence calls must use Velocity's single-object arguments syntax. */
Velocity.RunSequence = function (originalSequence) {
var sequence = $.extend(true, [], originalSequence);
if (sequence.length > 1) {
$.each(sequence.reverse(), function(i, currentCall) {
var nextCall = sequence[i + 1];
if (nextCall) {
/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered
in the previous call's begin callback. Otherwise, chained calls are normally triggered
in the previous call's complete callback. */
var timing = (currentCall.options && currentCall.options.sequenceQueue === false) ? "begin" : "complete",
callbackOriginal = nextCall.options && nextCall.options[timing],
options = {};
options[timing] = function() {
var nextCallElements = nextCall.elements || nextCall.e;
var elements = nextCallElements.nodeType ? [ nextCallElements ] : nextCallElements;
callbackOriginal && callbackOriginal.call(elements, elements);
Velocity(currentCall);
}
nextCall.options = $.extend({}, nextCall.options, options);
}
});
sequence.reverse();
}
Velocity(sequence[0]);
};
}((window.jQuery || window.Zepto || window), window, document); }((window.jQuery || window.Zepto || window), window, document);
})); }));