Giving all controls an events instance. You can now listen for activate and deactivate on any control. Panel controls do this to know when they should redraw. Navigation history control demonstrates the effect of this change. r=elemoine (closes #1346)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6167 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
function test_Control_Navigation_destroy (t) {
|
||||
t.plan(9);
|
||||
t.plan(10);
|
||||
|
||||
var temp = OpenLayers.Control.prototype.destroy;
|
||||
OpenLayers.Control.prototype.destroy = function() {
|
||||
@@ -26,6 +26,11 @@
|
||||
};
|
||||
|
||||
var control = {
|
||||
events: {
|
||||
destroy: function() {
|
||||
t.ok(true, "events destroyed");
|
||||
}
|
||||
},
|
||||
'deactivate': function() {
|
||||
t.ok(true, "navigation control deactivated before being destroyed");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user