For now found a solution that is working for me but seems that there should
be a better, more generic way of doing this. 
I wrote a function to just turn off all other active controls (see below),
but that I need now to put into every control handler function to switch off
other active control.  Using events , listeneeres and so forth there should
be a better way. How would you go about this ?
 
Cheers
Karsten
 
function deactivateToggleControls(){
   for (eachControl in customToolPanel.controls) {
        if (customToolPanel.controls[eachControl].active) {
           customToolPanel.controls[eachControl].deactivate();
        }
   }
}  


  _____  

From: karsten [mailto:[email protected]] 
Sent: Thursday, September 20, 2012 11:51 PM
To: '[email protected]'
Subject: one control panel - mixed control types - how to disable all others


Hi All,
 
I am not sure  if it expected behavior if you have a panel with multiple
controls, some Type 'Button' plus others such as Control.MeasureNew and
Control.MouseDefaults that the last two deactivate once the other is
clicked, but the button type controls won't deactivate then ?
For example when the user clicks son the 'MouseDefaults ' control then
'MeasureNew ' is deactivated (if it was active previously) , however
clicking on any of the button type controls does not deactivate 'MeasureNew'
 
So I was wondering what is the standard / or best way to have the button
controls when activated , deactivate all other controls ?
 
Cheers
Karsten
 

Karsten Vennemann
Principal

Terra GIS LTD
 <http://www.terragis.net/> www.terragis.net

 




=======
Email scanned by PC Tools - No viruses or spyware found.
(Email Guard: 9.0.0.2308, Virus/Spyware Database: 6.20640)
http://www.pctools.com/
=======
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to