From: Tomster Date: Wed, 24 Jun 2015 18:51:20 +0000 (+0200) Subject: Use prevCallbacks[i].highlightCallback.apply(this, arguments) instead so this works... X-Git-Tag: v2.0.0~45^2~2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=48651beba22d456c1226b62392072684298aca12;p=dygraphs.git Use prevCallbacks[i].highlightCallback.apply(this, arguments) instead so this works in prevCallbacks[i].highlightCallback --- diff --git a/src/extras/synchronizer.js b/src/extras/synchronizer.js index 16c042e..78efbcb 100644 --- a/src/extras/synchronizer.js +++ b/src/extras/synchronizer.js @@ -162,7 +162,7 @@ function attachZoomHandlers(gs, syncOpts, prevCallbacks) { for (var j = 0; j < gs.length; j++) { if (gs[j] == me) { if (prevCallbacks[j] && prevCallbacks[j].drawCallback) { - prevCallbacks[j].drawCallback(me, initial); + prevCallbacks[j].drawCallback.apply(this, arguments); } continue; } @@ -187,7 +187,7 @@ function attachSelectionHandlers(gs, prevCallbacks) { for (var i = 0; i < gs.length; i++) { if (me == gs[i]) { if (prevCallbacks[i] && prevCallbacks[i].highlightCallback) { - prevCallbacks[i].highlightCallback(event, x, points, row, seriesName); + prevCallbacks[i].highlightCallback.apply(this, arguments); } continue; } @@ -205,7 +205,7 @@ function attachSelectionHandlers(gs, prevCallbacks) { for (var i = 0; i < gs.length; i++) { if (me == gs[i]) { if (prevCallbacks[i] && prevCallbacks[i].unhighlightCallback) { - prevCallbacks[i].unhighlightCallback(event); + prevCallbacks[i].unhighlightCallback.apply(this, arguments); } continue; }