*/
Dygraph.Interaction.startZoom = function(event, g, context) {
context.isZooming = true;
+ context.zoomMoved = false;
};
/**
* dragStartX/dragStartY/etc. properties). This function modifies the context.
*/
Dygraph.Interaction.moveZoom = function(event, g, context) {
+ context.zoomMoved = true;
context.dragEndX = g.dragGetX_(event, context);
context.dragEndY = g.dragGetY_(event, context);
Math.max(context.dragStartY, context.dragEndY));
context.cancelNextDblclick = true;
} else {
- g.clearZoomRect_();
+ if (zoomMoved) g.clearZoomRect_();
}
context.dragStartX = null;
context.dragStartY = null;