identified a couple public methods in the global object which are actually private

This commit is contained in:
Eric Rowell
2012-04-28 11:23:47 -07:00
parent 4e82139b74
commit 3200a9063a
5 changed files with 14 additions and 14 deletions

View File

@@ -39,11 +39,11 @@ Kinetic.GlobalObject = {
}
}
},
addAnimation: function(anim) {
_addAnimation: function(anim) {
anim.id = Kinetic.GlobalObject.animIdCounter++;
this.animations.push(anim);
},
removeAnimation: function(id) {
_removeAnimation: function(id) {
var animations = this.animations;
for(var n = 0; n < animations.length; n++) {
if(animations[n].id === id) {

View File

@@ -661,11 +661,11 @@ Kinetic.Node.prototype = {
* adding the animation with the addAnimation
* method auto generates an id
*/
go.addAnimation(anim);
go._addAnimation(anim);
// subscribe to onFinished for first tween
trans.tweens[0].onFinished = function() {
go.removeAnimation(anim.id);
go._removeAnimation(anim.id);
if(config.callback !== undefined) {
config.callback();
}

View File

@@ -86,7 +86,7 @@ Kinetic.Stage.prototype = {
*/
start: function() {
var go = Kinetic.GlobalObject;
go.addAnimation(this.anim);
go._addAnimation(this.anim);
go._handleAnimation();
},
/**
@@ -94,7 +94,7 @@ Kinetic.Stage.prototype = {
*/
stop: function() {
var go = Kinetic.GlobalObject;
go.removeAnimation(this.anim.id);
go._removeAnimation(this.anim.id);
go._handleAnimation();
},
/**