Respect alwaysInRange from prototype, but allow changes in addOptions.

This commit is contained in:
ahocevar
2012-04-19 12:02:18 +02:00
parent bce40d9e42
commit ef33f01504
2 changed files with 16 additions and 1 deletions
+10
View File
@@ -174,6 +174,16 @@
t.eq(log, 0, "addOptions doesn't call initResolutions when layer is not in map");
}
function test_addOptionsScale(t) {
t.plan(1);
var map = new OpenLayers.Map("map");
var layer = new OpenLayers.Layer.WMS();
map.addLayer(layer);
map.zoomToMaxExtent();
layer.addOptions({maxResolution: 0.5, numZoomLevels: 15});
t.eq(layer.alwaysInRange, false, "alwaysInRange should not be true anymore");
}
function test_Layer_StandardOptionsAccessors (t) {
t.plan( 4 );