Merge branch 'master' into fixed-strategy
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
});
|
||||
|
||||
// create a map with the layers and a center
|
||||
var map = new OpenLayers.Map("map");
|
||||
var map = new OpenLayers.Map("map", {zoomMethod: null});
|
||||
map.addLayers([dummy, layer]);
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
function test_resFactor(t) {
|
||||
t.plan(2);
|
||||
|
||||
var map = new OpenLayers.Map("map");
|
||||
var map = new OpenLayers.Map("map", {zoomMethod: null});
|
||||
var bbox = new OpenLayers.Strategy.BBOX();
|
||||
var fakeProtocol = new OpenLayers.Protocol({
|
||||
'read': function() {
|
||||
|
||||
@@ -44,7 +44,8 @@
|
||||
});
|
||||
var map = new OpenLayers.Map('map', {
|
||||
resolutions: [4, 2, 1],
|
||||
maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40)
|
||||
maxExtent: new OpenLayers.Bounds(-40, -40, 40, 40),
|
||||
zoomMethod: null
|
||||
});
|
||||
map.addLayer(layer);
|
||||
|
||||
|
||||
@@ -31,6 +31,21 @@
|
||||
"activates registers visibilitychanged listener");
|
||||
}
|
||||
|
||||
function test_deactivate(t) {
|
||||
t.plan(3);
|
||||
|
||||
var l = new OpenLayers.Layer.Vector();
|
||||
l.setVisibility(false);
|
||||
var s = new OpenLayers.Strategy.Refresh();
|
||||
s.setLayer(l);
|
||||
s.activate();
|
||||
var deactivated = s.deactivate();
|
||||
t.eq(deactivated, true, "deactivate returns true");
|
||||
t.eq(s.active, false, "deactivated after activate");
|
||||
t.ok(l.events.listeners.visibilitychanged.length == 0,
|
||||
"deactivate unregisters visibilitychanged listener");
|
||||
}
|
||||
|
||||
function test_activateWithVisibleLayer(t) {
|
||||
t.plan(5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user