From: Dan Vanderkam Date: Sun, 21 Jul 2013 14:23:03 +0000 (-0400) Subject: export fewer methods X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=02fb5fa1d1cc443270720bae660be3262a1cf057;p=dygraphs.git export fewer methods --- diff --git a/dygraph-utils.js b/dygraph-utils.js index 7366bae..ac147e5 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -833,8 +833,8 @@ Dygraph.createIterator = function(array, start, length, opt_predicate) { // Shim layer with setTimeout fallback. // From: http://paulirish.com/2011/requestanimationframe-for-smart-animating/ // Should be called with the window context: -// Dygraph.requestAnimFrame.call(window, function() {}) -Dygraph.requestAnimFrame = (function() { +// requestAnimFrame.call(window, function() {}) +var requestAnimFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || @@ -872,7 +872,7 @@ Dygraph.repeatAndCleanup = function(repeatFn, maxFrames, framePeriodInMillis, (function loop() { if (frameNumber >= maxFrames) return; - Dygraph.requestAnimFrame.call(window, function() { + requestAnimFrame.call(window, function() { // Determine which frame to draw based on the delay so far. Will skip // frames if necessary. var currentTime = new Date().getTime();