Skip to content

Commit

Permalink
renamed internal polyfill function to enable
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjehl committed Feb 16, 2012
1 parent 4d45c26 commit 4cc5e6b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions overthrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
},

// Enable and potentially polyfill overflow
polyfill = function(){
enable = function(){

// If it's on,
if( enabled ){
Expand Down Expand Up @@ -175,7 +175,7 @@
// Multipliers are tweaked to a comfortable balance across platforms
var top = ( lastTops[ 0 ] - lastTops[ lastTops.length -1 ] ) * 8,
left = ( lastLefts[ 0 ] - lastLefts[ lastLefts.length -1 ] ) * 8,
duration = Math.max( Math.abs( left ), Math.abs( top ) ) / 14;
duration = Math.max( Math.abs( left ), Math.abs( top ) ) / 8;

// Make top and left relative-style strings (positive vals need "+" prefix)
top = ( top > 0 ? "+" : "" ) + top;
Expand Down Expand Up @@ -315,15 +315,16 @@

// Expose overthrow API
w.overthrow = {
set: polyfill,
set: enable,
forget: function(){},
easing: defaultEasing,
toss: toss,
intercept: intercept,
closest: closest,
support: overflowProbablyAlreadyWorks ? "native" : canBeFilledWithPoly && "polyfilled" || "none"
};

polyfill();

// Auto-init
enable();

})( this );

0 comments on commit 4cc5e6b

Please sign in to comment.