X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-interaction-model.js;h=53e2f44d58839a1477e307aca76c81a5e9e7f868;hb=05f0c949e08dc94bb8cbaab4502a9e7c547c6d81;hp=a2f17c650d138271852532b34804e1ceee7cfd4d;hpb=d55a912ad2c97a3a0e4de0144157a761005494b3;p=dygraphs.git diff --git a/dygraph-interaction-model.js b/dygraph-interaction-model.js index a2f17c6..53e2f44 100644 --- a/dygraph-interaction-model.js +++ b/dygraph-interaction-model.js @@ -49,7 +49,7 @@ Dygraph.Interaction.maybeTreatMouseOpAsClick = function(event, g, context) { context.regionWidth = regionWidth; context.regionHeight = regionHeight; -} +}; /** * Called in response to an interaction model operation that @@ -371,6 +371,7 @@ Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) { * context. */ Dygraph.Interaction.endZoom = function(event, g, context) { + g.clearZoomRect_(); context.isZooming = false; Dygraph.Interaction.maybeTreatMouseOpAsClick(event, g, context); @@ -398,8 +399,6 @@ Dygraph.Interaction.endZoom = function(event, g, context) { g.doZoomY_(top, bottom); } context.cancelNextDblclick = true; - } else { - if (context.zoomMoved) g.clearZoomRect_(); } context.dragStartX = null; context.dragStartY = null;