Don't let button controls interfer with handlers.

This change involves removal of the map's eventsDiv and introduces an OpenLayers.Events.buttonclick component that adds a buttonclick event which makes sure that only events that are not related to clicking a button propagate. This allows button controls to be on the map's viewPortDiv again.
This commit is contained in:
ahocevar
2012-01-20 03:37:11 +01:00
parent e68acfe91a
commit 05de2b5109
22 changed files with 520 additions and 224 deletions
+4 -1
View File
@@ -82,7 +82,7 @@
function test_Events_register_unregister(t) {
t.plan(19);
t.plan(20);
var mapDiv = OpenLayers.Util.getElement('map');
var obj = {result: 0};
@@ -165,6 +165,9 @@
} catch (err) {
t.fail("unregistering for an event with no registered listeners causes trouble: " + err);
}
events.register("buttonclick", obj, func);
t.ok(events.extensions.buttonclick, "buttonclick extension registered");
}