mouseEvents: { enable: function () { dojo.forEach(app.map.graphicsLayerIds, function (layer) { app.map.getLayer(layer).enableMouseEvents() }) }, disable: function () { dojo.forEach(app.map.graphicsLayerIds, function (layer) { app.map.getLayer(layer).disableMouseEvents() }) } }
With the changes in version 3.10 I had to refactor my code to disable popups while the measurement widget is active. Here is my approach:
(1) I have the measurement widget as a property of my app class. I use aspect to run my function after the measurement widget setTool function is called.
aspect.after(this.measurement,'setTool',lang.hitch(this, this._measurementDeconflict));
(2) In my _measurementDeconflict function I check if any of the measurement tools are active and then disable or enable click events for the info window.
_measurementDeconflict: function(evt){ var blnActive = this.measurement.area.checked || this.measurement.distance.checked || this.measurement.location.checked) ? true:false; if (blnActive){ this.map.setInfoWindowOnClick(true); } else{ this.map.setInfoWindowOnClick(false); } }