summaryrefslogtreecommitdiff
path: root/lib/dojo/fx
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-11-08 20:40:44 +0400
committerAndrew Dolgov <[email protected]>2011-11-08 20:40:44 +0400
commit81bea17aefb26859f825b9293c7c99192874806e (patch)
treefb244408ca271affa2899adb634788802c9a89d8 /lib/dojo/fx
parent870a70e109ac9e80a88047044530de53d0404ec7 (diff)
upgrade Dojo to 1.6.1
Diffstat (limited to 'lib/dojo/fx')
-rw-r--r--lib/dojo/fx/Toggler.js15
-rw-r--r--lib/dojo/fx/easing.js60
2 files changed, 39 insertions, 36 deletions
diff --git a/lib/dojo/fx/Toggler.js b/lib/dojo/fx/Toggler.js
index ddc3e225d..dc4693d8e 100644
--- a/lib/dojo/fx/Toggler.js
+++ b/lib/dojo/fx/Toggler.js
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -9,6 +9,7 @@ if(!dojo._hasResource["dojo.fx.Toggler"]){ //_hasResource checks added by build.
dojo._hasResource["dojo.fx.Toggler"] = true;
dojo.provide("dojo.fx.Toggler");
+
dojo.declare("dojo.fx.Toggler", null, {
// summary:
// A simple `dojo.Animation` toggler API.
@@ -16,16 +17,16 @@ dojo.declare("dojo.fx.Toggler", null, {
// description:
// class constructor for an animation toggler. It accepts a packed
// set of arguments about what type of animation to use in each
- // direction, duration, etc. All available members are mixed into
- // these animations from the constructor (for example, `node`,
- // `showDuration`, `hideDuration`).
+ // direction, duration, etc. All available members are mixed into
+ // these animations from the constructor (for example, `node`,
+ // `showDuration`, `hideDuration`).
//
// example:
// | var t = new dojo.fx.Toggler({
// | node: "nodeId",
// | showDuration: 500,
// | // hideDuration will default to "200"
- // | showFunc: dojo.fx.wipeIn,
+ // | showFunc: dojo.fx.wipeIn,
// | // hideFunc will default to "fadeOut"
// | });
// | t.show(100); // delay showing for 100ms
@@ -40,7 +41,7 @@ dojo.declare("dojo.fx.Toggler", null, {
// The function that returns the `dojo.Animation` to show the node
showFunc: dojo.fadeIn,
- // hideFunc: Function
+ // hideFunc: Function
// The function that returns the `dojo.Animation` to hide the node
hideFunc: dojo.fadeOut,
@@ -56,7 +57,7 @@ dojo.declare("dojo.fx.Toggler", null, {
// time show/hide are called if we're stopped somewhere in the
// middle.
// FIXME: also would be nice to specify individual showArgs/hideArgs mixed into
- // each animation individually.
+ // each animation individually.
// FIXME: also would be nice to have events from the animations exposed/bridged
/*=====
diff --git a/lib/dojo/fx/easing.js b/lib/dojo/fx/easing.js
index 0ce6efbff..c26af8971 100644
--- a/lib/dojo/fx/easing.js
+++ b/lib/dojo/fx/easing.js
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -9,11 +9,13 @@ if(!dojo._hasResource["dojo.fx.easing"]){ //_hasResource checks added by build.
dojo._hasResource["dojo.fx.easing"] = true;
dojo.provide("dojo.fx.easing");
+dojo.getObject("fx.easing", true, dojo);
+
dojo.fx.easing = {
- // summary:
- // Collection of easing functions to use beyond the default
+ // summary:
+ // Collection of easing functions to use beyond the default
// `dojo._defaultEasing` function.
- //
+ //
// description:
//
// Easing functions are used to manipulate the iteration through
@@ -21,22 +23,22 @@ dojo.fx.easing = {
// and the easing function progresses through that Line determing
// how quickly (or slowly) it should go. Or more accurately: modify
// the value of the _Line based on the percentage of animation completed.
- //
+ //
// All functions follow a simple naming convention of "ease type" + "when".
// If the name of the function ends in Out, the easing described appears
// towards the end of the animation. "In" means during the beginning,
// and InOut means both ranges of the Animation will applied, both
- // beginning and end.
+ // beginning and end.
//
- // One does not call the easing function directly, it must be passed to
+ // One does not call the easing function directly, it must be passed to
// the `easing` property of an animation.
//
// example:
// | dojo.require("dojo.fx.easing");
// | var anim = dojo.fadeOut({
- // | node: 'node',
+ // | node: 'node',
// | duration: 2000,
- // | // note there is no ()
+ // | // note there is no ()
// | easing: dojo.fx.easing.quadIn
// | }).play();
//
@@ -151,24 +153,24 @@ dojo.fx.easing = {
},
backIn: function(/* Decimal? */n){
- // summary:
- // An easing function that starts away from the target,
+ // summary:
+ // An easing function that starts away from the target,
// and quickly accelerates towards the end value.
- //
- // Use caution when the easing will cause values to become
+ //
+ // Use caution when the easing will cause values to become
// negative as some properties cannot be set to negative values.
var s = 1.70158;
return Math.pow(n, 2) * ((s + 1) * n - s);
},
backOut: function(/* Decimal? */n){
- // summary:
- // An easing function that pops past the range briefly, and slowly comes back.
+ // summary:
+ // An easing function that pops past the range briefly, and slowly comes back.
//
// description:
- // An easing function that pops past the range briefly, and slowly comes back.
+ // An easing function that pops past the range briefly, and slowly comes back.
//
- // Use caution when the easing will cause values to become negative as some
+ // Use caution when the easing will cause values to become negative as some
// properties cannot be set to negative values.
n = n - 1;
@@ -177,12 +179,12 @@ dojo.fx.easing = {
},
backInOut: function(/* Decimal? */n){
- // summary:
+ // summary:
// An easing function combining the effects of `backIn` and `backOut`
//
// description:
// An easing function combining the effects of `backIn` and `backOut`.
- // Use caution when the easing will cause values to become negative
+ // Use caution when the easing will cause values to become negative
// as some properties cannot be set to negative values.
var s = 1.70158 * 1.525;
n = n * 2;
@@ -192,13 +194,13 @@ dojo.fx.easing = {
},
elasticIn: function(/* Decimal? */n){
- // summary:
+ // summary:
// An easing function the elastically snaps from the start value
//
// description:
// An easing function the elastically snaps from the start value
- //
- // Use caution when the elasticity will cause values to become negative
+ //
+ // Use caution when the elasticity will cause values to become negative
// as some properties cannot be set to negative values.
if(n == 0 || n == 1){ return n; }
var p = .3;
@@ -208,7 +210,7 @@ dojo.fx.easing = {
},
elasticOut: function(/* Decimal? */n){
- // summary:
+ // summary:
// An easing function that elasticly snaps around the target value,
// near the end of the Animation
//
@@ -216,7 +218,7 @@ dojo.fx.easing = {
// An easing function that elasticly snaps around the target value,
// near the end of the Animation
//
- // Use caution when the elasticity will cause values to become
+ // Use caution when the elasticity will cause values to become
// negative as some properties cannot be set to negative values.
if(n==0 || n == 1){ return n; }
var p = .3;
@@ -225,7 +227,7 @@ dojo.fx.easing = {
},
elasticInOut: function(/* Decimal? */n){
- // summary:
+ // summary:
// An easing function that elasticly snaps around the value, near
// the beginning and end of the Animation.
//
@@ -233,7 +235,7 @@ dojo.fx.easing = {
// An easing function that elasticly snaps around the value, near
// the beginning and end of the Animation.
//
- // Use caution when the elasticity will cause values to become
+ // Use caution when the elasticity will cause values to become
// negative as some properties cannot be set to negative values.
if(n == 0) return 0;
n = n * 2;
@@ -249,7 +251,7 @@ dojo.fx.easing = {
},
bounceIn: function(/* Decimal? */n){
- // summary:
+ // summary:
// An easing function that 'bounces' near the beginning of an Animation
return (1 - dojo.fx.easing.bounceOut(1 - n)); // Decimal
},
@@ -259,7 +261,7 @@ dojo.fx.easing = {
// An easing function that 'bounces' near the end of an Animation
var s = 7.5625;
var p = 2.75;
- var l;
+ var l;
if(n < (1 / p)){
l = s * Math.pow(n, 2);
}else if(n < (2 / p)){
@@ -276,7 +278,7 @@ dojo.fx.easing = {
},
bounceInOut: function(/* Decimal? */n){
- // summary:
+ // summary:
// An easing function that 'bounces' at the beginning and end of the Animation
if(n < 0.5){ return dojo.fx.easing.bounceIn(n * 2) / 2; }
return (dojo.fx.easing.bounceOut(n * 2 - 1) / 2) + 0.5; // Decimal