function clickV3(event, g, context) {
lastClickedGraph = g;
- Dygraph.cancelEvent(event);
+ event.preventDefault();
+ event.stopPropagation();
}
function scrollV3(event, g, context) {
var yPct = percentages[1];
zoom(g, percentage, xPct, yPct);
- Dygraph.cancelEvent(event);
+ event.preventDefault();
+ event.stopPropagation();
}
// Adjusts [x, y] toward each other by zoomInPercentage%
var RANGE = 7;
if (v4Active) {
- var canvasx = Dygraph.pageX(event) - Dygraph.findPosX(g.graphDiv);
- var canvasy = Dygraph.pageY(event) - Dygraph.findPosY(g.graphDiv);
+ var graphPos = Dygraph.findPos(g.graphDiv);
+ var canvasx = Dygraph.pageX(event) - graphPos.x;
+ var canvasy = Dygraph.pageY(event) - graphPos.y;
var rows = g.numRows();
// Row layout: