prepared transition logic for new easing functions

This commit is contained in:
Eric Rowell
2012-03-19 21:09:13 -07:00
parent 588b65a849
commit 8f0aebad11
6 changed files with 128 additions and 32 deletions

View File

@@ -17,7 +17,7 @@ Kinetic.Layer = function(config) {
this.transitions = [];
this.transitionIdCounter = 0;
this.isTransitioning = false;
// call super constructors
Kinetic.Container.apply(this, []);
Kinetic.Node.apply(this, [config]);
@@ -74,6 +74,18 @@ Kinetic.Layer.prototype = {
if(this.visible) {
this._drawChildren();
}
},
/**
* clear transition if one is running
*/
_clearTransition: function(shape) {
for(var n = 0; n < this.transitions.length; n++) {
var transition = this.transitions[n];
if(transition.node.id === shape.id) {
Kinetic.GlobalObject._removeTransition(transition);
return false;
}
}
}
};
// Extend Container and Node