From: Dan Vanderkam Date: Tue, 12 Jul 2011 21:27:39 +0000 (-0400) Subject: kberg requests that nonInteractiveModel be private X-Git-Tag: v1.0.0~452 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=0290d079ee1d4558b652877c81621884f425fc3a;p=dygraphs.git kberg requests that nonInteractiveModel be private --- diff --git a/auto_tests/tests/interaction_model.js b/auto_tests/tests/interaction_model.js index 5d3c435..a363f55 100644 --- a/auto_tests/tests/interaction_model.js +++ b/auto_tests/tests/interaction_model.js @@ -150,7 +150,7 @@ InteractionModelTestCase.prototype.testClickCallbackIsCalledWithNonInteractiveMo width: 100, height : 100, clickCallback : clickCallback, - interactionModel : {} + interactionModel : Dygraph.Interaction.nonInteractiveModel_ }; var graph = document.getElementById("graph"); diff --git a/dygraph-interaction-model.js b/dygraph-interaction-model.js index 645c258..32809f5 100644 --- a/dygraph-interaction-model.js +++ b/dygraph-interaction-model.js @@ -393,7 +393,7 @@ Dygraph.endPan = Dygraph.Interaction.endPan; Dygraph.movePan = Dygraph.Interaction.movePan; Dygraph.startPan = Dygraph.Interaction.startPan; -Dygraph.Interaction.nonInteractiveModel = { +Dygraph.Interaction.nonInteractiveModel_ = { mousedown: function(event, g, context) { context.initializeMouseDown(event, g, context); }, diff --git a/tests/interaction.html b/tests/interaction.html index 58f3dac..3259268 100644 --- a/tests/interaction.html +++ b/tests/interaction.html @@ -60,13 +60,7 @@ NoisyData, { errorBars : true, - interactionModel: Dygraph.Interaction.nonInteractiveModel, - clickCallback: function(e, x, pts) { - s.innerHTML += "Click " + pts[0].name + ": " + pts[0].x + "
"; - }, - pointClickCallback: function(e, p) { - s.innerHTML += "Point Click " + p.name + ": " + p.x + "
"; - }, + interactionModel: {} }); var g3 = new Dygraph(document.getElementById("div_g3"), NoisyData, { errorBars : true, interactionModel : {