Skip to content

Commit

Permalink
Removed redundant tween functions for String/Number as we now rely on…
Browse files Browse the repository at this point in the history
… Shifty
  • Loading branch information
joelambert committed Jun 28, 2011
1 parent ed8a8c9 commit 7147fba
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions js/src/tween.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,6 @@ var Tween = function(elem, css, opts) {
console.log(createAnimationCSS(keyframes, animName));
};

// Setup a placeholder to load custom easing functions
Tween.prototype.fn = {};



String.prototype.tween = function(dest, progress, fn){
var v1 = parseInt(this), v2 = parseInt(dest);
return parseInt(v1 + ((v2-v1) * fn(progress))) + "px";
};

Number.prototype.tween = function(dest, progress, fn){
return parseFloat(this + ((dest-this) * fn(progress)));
};

String.prototype.toDash = function(){
var str = this.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();});
return /^webkit/.test(str) ? '-'+str : str;
Expand Down

0 comments on commit 7147fba

Please sign in to comment.