projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't redraw graph stack in interactive highlight
[dygraphs.git]
/
dygraph-utils.js
diff --git
a/dygraph-utils.js
b/dygraph-utils.js
index
10a393c
..
1d1623f
100644
(file)
--- a/
dygraph-utils.js
+++ b/
dygraph-utils.js
@@
-816,7
+816,9
@@
Dygraph.createIterator = function(array, start, length, opt_predicate) {
// Shim layer with setTimeout fallback.
// From: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// Shim layer with setTimeout fallback.
// From: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
-Dygraph.requestAnimFrame = (function(){
+// Should be called with the window context:
+// Dygraph.requestAnimFrame.call(window, function() {})
+Dygraph.requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
@@
-841,7
+843,7
@@
Dygraph.requestAnimFrame = (function(){
* @private
*/
Dygraph.repeatAndCleanup = function(repeatFn, maxFrames, framePeriodInMillis,
* @private
*/
Dygraph.repeatAndCleanup = function(repeatFn, maxFrames, framePeriodInMillis,
- cleanupFn) {
+
cleanupFn) {
var frameNumber = 0;
var previousFrameNumber;
var startTime = new Date().getTime();
var frameNumber = 0;
var previousFrameNumber;
var startTime = new Date().getTime();
@@
-854,7
+856,7
@@
Dygraph.repeatAndCleanup = function(repeatFn, maxFrames, framePeriodInMillis,
(function loop() {
if (frameNumber >= maxFrames) return;
(function loop() {
if (frameNumber >= maxFrames) return;
- Dygraph.requestAnimFrame
(
function() {
+ Dygraph.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();
// Determine which frame to draw based on the delay so far. Will skip
// frames if necessary.
var currentTime = new Date().getTime();
@@
-871,7
+873,7
@@
Dygraph.repeatAndCleanup = function(repeatFn, maxFrames, framePeriodInMillis,
repeatFn(maxFrameArg); // Ensure final call with maxFrameArg.
cleanupFn();
} else {
repeatFn(maxFrameArg); // Ensure final call with maxFrameArg.
cleanupFn();
} else {
- if (frameDelta != 0) { // Don't call repeatFn with duplicate frames.
+ if (frameDelta !=
=
0) { // Don't call repeatFn with duplicate frames.
repeatFn(frameNumber);
}
loop();
repeatFn(frameNumber);
}
loop();
@@
-1027,7
+1029,6
@@
Dygraph.regularShape_ = function(
delta = delta || Math.PI * 2 / sides;
ctx.beginPath();
delta = delta || Math.PI * 2 / sides;
ctx.beginPath();
- var first = true;
var initialAngle = rotationRadians;
var angle = initialAngle;
var initialAngle = rotationRadians;
var angle = initialAngle;