X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-interaction-model.js;h=75ee78f13a59a2a18ce4cfbcf866d5cc8725ec88;hb=d3b990da77ec190c27faf0fb5c7a6a4034880c2f;hp=b02510e8849153a1d25e86b4a77b88dd84943069;hpb=b0963cdbacfdda608252d4154d54cf2e390e30e1;p=dygraphs.git diff --git a/dygraph-interaction-model.js b/dygraph-interaction-model.js index b02510e..75ee78f 100644 --- a/dygraph-interaction-model.js +++ b/dygraph-interaction-model.js @@ -115,8 +115,8 @@ Dygraph.Interaction.startPan = function(event, g, context) { * context. */ Dygraph.Interaction.movePan = function(event, g, context) { - context.dragEndX = g.dragGetX_(event, context); - context.dragEndY = g.dragGetY_(event, context); + context.dragEndX = Dygraph.dragGetX_(event, context); + context.dragEndY = Dygraph.dragGetY_(event, context); var minDate = context.initialLeftmostDate - (context.dragEndX - context.dragStartX) * context.xUnitsPerPixel; @@ -188,8 +188,8 @@ Dygraph.Interaction.movePan = function(event, g, context) { * context. */ Dygraph.Interaction.endPan = function(event, g, context) { - context.dragEndX = g.dragGetX_(event, context); - context.dragEndY = g.dragGetY_(event, context); + context.dragEndX = Dygraph.dragGetX_(event, context); + context.dragEndY = Dygraph.dragGetY_(event, context); var regionWidth = Math.abs(context.dragEndX - context.dragStartX); var regionHeight = Math.abs(context.dragEndY - context.dragStartY); @@ -246,8 +246,8 @@ Dygraph.Interaction.startZoom = function(event, g, context) { */ Dygraph.Interaction.moveZoom = function(event, g, context) { context.zoomMoved = true; - context.dragEndX = g.dragGetX_(event, context); - context.dragEndY = g.dragGetY_(event, context); + context.dragEndX = Dygraph.dragGetX_(event, context); + context.dragEndY = Dygraph.dragGetY_(event, context); var xDelta = Math.abs(context.dragStartX - context.dragEndX); var yDelta = Math.abs(context.dragStartY - context.dragEndY); @@ -333,8 +333,8 @@ Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) { */ Dygraph.Interaction.endZoom = function(event, g, context) { context.isZooming = false; - context.dragEndX = g.dragGetX_(event, context); - context.dragEndY = g.dragGetY_(event, context); + context.dragEndX = Dygraph.dragGetX_(event, context); + context.dragEndY = Dygraph.dragGetY_(event, context); var regionWidth = Math.abs(context.dragEndX - context.dragStartX); var regionHeight = Math.abs(context.dragEndY - context.dragStartY); @@ -645,8 +645,8 @@ Dygraph.Interaction.nonInteractiveModel_ = { }, mouseup: function(event, g, context) { // TODO(danvk): this logic is repeated in Dygraph.Interaction.endZoom - context.dragEndX = g.dragGetX_(event, context); - context.dragEndY = g.dragGetY_(event, context); + context.dragEndX = Dygraph.dragGetX_(event, context); + context.dragEndY = Dygraph.dragGetY_(event, context); var regionWidth = Math.abs(context.dragEndX - context.dragStartX); var regionHeight = Math.abs(context.dragEndY - context.dragStartY);