Change OpenLayers.Layer.setIsBaseLayer to trig the 'changebaselayer' event not

the 'changelayer' event. r=crschmidt (Closes #1306) 



git-svn-id: http://svn.openlayers.org/trunk/openlayers@5917 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2008-01-28 13:10:46 +00:00
parent 221967cc3f
commit 866cfe631d
2 changed files with 14 additions and 1 deletions

View File

@@ -223,6 +223,19 @@
}
function test_layer_setIsBaseLayer(t) {
t.plan(2);
var map = new OpenLayers.Map('map');
layer = new OpenLayers.Layer();
map.events.register("changebaselayer", t, function() {
this.ok(true, "setIsBaseLayer() trig changebaselayer event.")
});
map.addLayer(layer);
layer.setIsBaseLayer(true);
t.ok(layer.isBaseLayer, "setIsBaseLayer() change isBaseLayer property.");
}
function test_08_layer_setTileSize(t) {
t.plan(6);