Hey Andrew,

Maybe not the best way of doing it, but you could register an event for a map 
mouseover which closes all your menus like this:

map.events.on({'mouseover': function(e)
    {
        Ext.menu.MenuMgr.hideAll();
    }
});

You could also use the movestart event, but that will only hide the menu once a 
map drag / pan / zoom is started (ie: click plus mouse movement) not just on a 
click.

Hope that helps,

James Sewell


From: [email protected] [mailto:[email protected]] On Behalf Of 
Dwyer, Andrew
Sent: Thursday, 8 July 2010 11:50 AM
To: [email protected]
Subject: [Users] Clicking on OpenLayers map doesn't hide Ext menus 
[SEC=UNCLASSIFIED]


UNCLASSIFIED
Hi all,

I'm using GeoExt 0.7 and ExtJS 3.2.1.  Can someone please tell me how I can 
make mouse clicks on the OpenLayers map hide Ext menus?  The problem is shown 
in the GeoExt toolbar example 
(http://dev.geoext.org/trunk/geoext/examples/toolbar.html).  When a user clicks 
on the menu button, then clicks the map, the menu continues to be displayed 
rather than being hidden.  If the user clicks anywhere outside of the map the 
menu is dismissed as normal.

Has this problem been discussed before?  I've had a look around but couldn't 
find anything

Thanks

Andrew Dwyer

IMPORTANT: This email remains the property of the Department of Defence and is 
subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have 
received this email in error, you are requested to contact the sender and 
delete the email.
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to