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:
+4
-1
@@ -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");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user