From: Dan Vanderkam Date: Thu, 22 Mar 2012 21:54:53 +0000 (-0400) Subject: Fix Issue 145: Chrome/right-click seems to start implementing zoom bounding boxes. X-Git-Tag: v1.0.0~303 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=e992d194f31a37cbf2cb2a34c08f218ad9be2113;p=dygraphs.git Fix Issue 145: Chrome/right-click seems to start implementing zoom bounding boxes. --- diff --git a/dygraph-interaction-model.js b/dygraph-interaction-model.js index 2790633..b6c19d2 100644 --- a/dygraph-interaction-model.js +++ b/dygraph-interaction-model.js @@ -499,6 +499,9 @@ Dygraph.Interaction.endTouch = function(event, g, context) { Dygraph.Interaction.defaultModel = { // Track the beginning of drag events mousedown: function(event, g, context) { + // Right-click should not initiate a zoom. + if (event.button && event.button == 2) return; + context.initializeMouseDown(event, g, context); if (event.altKey || event.shiftKey) {