[fusion-commits] r2036 - trunk/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Jan 14 14:59:44 EST 2010
Author: madair
Date: 2010-01-14 14:59:41 -0500 (Thu, 14 Jan 2010)
New Revision: 2036
Modified:
trunk/widgets/Measure.js
trunk/widgets/Redline.js
trunk/widgets/Select.js
Log:
closes #355: disable map context menu for widgets that draw on the map
Modified: trunk/widgets/Measure.js
===================================================================
--- trunk/widgets/Measure.js 2010-01-12 02:36:00 UTC (rev 2035)
+++ trunk/widgets/Measure.js 2010-01-14 19:59:41 UTC (rev 2036)
@@ -357,6 +357,7 @@
this.resetMeasure();
OpenLayers.Event.observe(document,"keypress",this.keyHandler);
this.loadDisplayPanel();
+ this.getMap().supressContextMenu(true);
},
loadDisplayPanel: function() {
@@ -405,6 +406,7 @@
OpenLayers.Event.stopObserving(document, 'keypress', this.keyHandler);
this.control.deactivate();
this.control.cancel();
+ this.getMap().supressContextMenu(false);
},
resetMeasure: function() {
Modified: trunk/widgets/Redline.js
===================================================================
--- trunk/widgets/Redline.js 2010-01-12 02:36:00 UTC (rev 2035)
+++ trunk/widgets/Redline.js 2010-01-14 19:59:41 UTC (rev 2036)
@@ -214,12 +214,14 @@
}
this.activateLayer(0);
this.activateControl(this.defaultControl,0);
+ this.getMap().supressContextMenu(true);
},
// desactivate the redline widget
deactivate: function() {
this.activeControl.deactivate();
this.activeControl = null;
+ this.getMap().supressContextMenu(false);
},
featureAdded: function(evt) {
Modified: trunk/widgets/Select.js
===================================================================
--- trunk/widgets/Select.js 2010-01-12 02:36:00 UTC (rev 2035)
+++ trunk/widgets/Select.js 2010-01-14 19:59:41 UTC (rev 2036)
@@ -106,10 +106,11 @@
* This function should be defined for all functions that register
* as a widget in the map
*/
- activate : function() {
+ activate: function() {
this.handler.activate();
//this.shiftHandler.activate();
this.getMap().setCursor(this.asCursor);
+ this.getMap().supressContextMenu(true);
},
/**
@@ -117,10 +118,11 @@
* This function should be defined for all functions that register
* as a widget in the map
**/
- deactivate : function() {
+ deactivate: function() {
this.handler.deactivate();
//this.shiftHandler.deactivate();
this.getMap().setCursor('auto');
+ this.getMap().supressContextMenu(false);
},
/**
More information about the fusion-commits
mailing list