}
var plotArea = this.layout_.getPlotArea();
- var xAxisLabelHeight = this.attr_('axisLabelFontSize') + 2 * this.attr_('axisTickSize');
+ var xAxisLabelHeight = this.attr_('xAxisHeight') || (this.attr_('axisLabelFontSize') + 2 * this.attr_('axisTickSize'));
this.canvasRect_ = {
x: plotArea.x,
y: plotArea.y + plotArea.h + xAxisLabelHeight + 4,
var isPanning = false;
var dynamic = !this.isMobileDevice_ && !this.isUsingExcanvas_;
+ // We cover iframes during mouse interactions. See comments in
+ // dygraph-utils.js for more info on why this is a good idea.
+ var tarp = new Dygraph.IFrameTarp();
+
// functions, defined below. Defining them this way (rather than with
// "function foo() {...}" makes JSHint happy.
var toXDataWindow, onZoomStart, onZoom, onZoomEnd, doZoom, isMouseInPanZone,
self.dygraph_.addEvent(topElem, 'mousemove', onZoom);
self.dygraph_.addEvent(topElem, 'mouseup', onZoomEnd);
self.fgcanvas_.style.cursor = 'col-resize';
+ tarp.cover();
return true;
};
}
Dygraph.cancelEvent(e);
var delX = e.screenX - xLast;
- if (Math.abs(delX) < 4 || e.screenX == 0) { // First iPad move event seems to have screenX = 0
+ if (Math.abs(delX) < 4 || e.screenX === 0) {
+ // First iPad move event seems to have screenX = 0
return true;
}
xLast = e.screenX;
return false;
}
isZooming = false;
+ tarp.uncover();
Dygraph.removeEvent(topElem, 'mousemove', onZoom);
Dygraph.removeEvent(topElem, 'mouseup', onZoomEnd);
self.fgcanvas_.style.cursor = 'default';