transition.js revision 0bd88aa0dd27b90b737a46238dcfc56abb7100cc
/**
* The Transitionation Utility provides an API for creating advanced transitions.
* @module anim
*/
/**
* Provides the base Transition class, for animating numeric properties.
*
* @module anim
* @submodule anim-base
*/
/**
* A class for constructing animation instances.
* @class Transition
* @for Transition
* @constructor
* @extends Base
*/
var START = 'transitionstart',
END = 'transitionend',
NUM = Number;
var _running = {},
Y.Transition = function() {
};
_start: function() {
this._startTime = new Date();
Y.Transition._startTimer();
},
if (finish) { // jump to last frame
}
this._running = false;
this._startTime = null;
},
_runFrame: function() {
var t = new Date() - this._startTime,
done = (t >= this._totalDuration),
this._runAttrs(t);
if (done) {
this._end();
}
},
var attr = this._runtimeAttr,
done = false,
d,
t,
i;
for (i in attr) {
t = time;
done = (t >= d);
if (t > d) {
t = d;
}
if (!this._skip[i]) {
if (done) {
this._skip[i] = true;
elapsedTime: d,
propertyName: i
});
}
}
}
}
},
_initAttrs: function() {
var from = {},
to = {},
attr = {},
this._totalDuration = 0;
if (typeof val === 'function') {
} else if (typeof val === 'object') {
}
}
return;
}
};
if (duration > this._totalDuration) {
this._totalDuration = duration;
}
}
}
this._skip = {};
this._runtimeAttr = attr;
},
// TODO: move to computedStyle? (browsers dont agree on default computed offsets)
_getOffset: function(attr) {
if (val === 'auto') {
} else {
val = 0;
}
}
return val;
},
destroy: function() {
this.detachAll();
this._node = null;
}
},
{
NAME: 'transition',
/**
* Regex of properties that should use the default unit.
*
* @property RE_DEFAULT_UNIT
* @static
*/
/**
* The default unit to use with properties that pass the RE_DEFAULT_UNIT test.
*
* @property DEFAULT_UNIT
* @static
*/
DEFAULT_UNIT: 'px',
DEFAULT_EASING: function (t, b, c, d) {
// easeBoth
if ((t/=d/2) < 1) {
return c/2*t*t + b;
}
return -c/2 * ((--t)*(t-2) - 1) + b;
},
/**
* Time in milliseconds passed to setInterval for frame processing
*
* @property intervalTime
* @default 20
* @static
*/
intervalTime: 20,
/**
* Bucket for custom getters and setters
*
* @property behaviors
* @static
*/
behaviors: {
left: {
}
}
},
/**
* The default setter to use when setting object properties.
*
* @property DEFAULT_SETTER
* @static
*/
} else {
}
},
/**
* The default getter to use when getting object properties.
*
* @property DEFAULT_GETTER
* @static
*/
val = '';
} else {
}
return val;
},
_startTimer: function() {
if (!_timer) {
}
},
_stopTimer: function() {
_timer = 0;
},
/**
* Called per Interval to handle each animation frame.
* @method _runFrame
* @private
* @static
*/
_runFrame: function() {
var done = true;
done = false;
}
}
if (done) {
Y.Transition._stopTimer();
}
},
}, true);
};