Put backbuffer below all layers, except when panning
This commit is contained in:
@@ -695,7 +695,11 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
if(!backBuffer) {
|
||||
return;
|
||||
}
|
||||
this.div.insertBefore(backBuffer, this.div.firstChild);
|
||||
if (resolution === this.gridResolution) {
|
||||
this.div.insertBefore(backBuffer, this.div.firstChild);
|
||||
} else {
|
||||
this.map.layerContainerDiv.insertBefore(backBuffer, this.map.baseLayer.div);
|
||||
}
|
||||
this.backBuffer = backBuffer;
|
||||
|
||||
// set some information in the instance for subsequent
|
||||
@@ -775,7 +779,9 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
||||
delete this._transitionElement;
|
||||
}
|
||||
if(this.backBuffer) {
|
||||
this.div.removeChild(this.backBuffer);
|
||||
if (this.backBuffer.parentNode) {
|
||||
this.backBuffer.parentNode.removeChild(this.backBuffer);
|
||||
}
|
||||
this.backBuffer = null;
|
||||
this.backBufferResolution = null;
|
||||
if(this.backBufferTimerId !== null) {
|
||||
|
||||
@@ -1043,7 +1043,7 @@
|
||||
layer.applyBackBuffer(2);
|
||||
t.ok(layer.backBuffer === backBuffer,
|
||||
'back buffer set in layer');
|
||||
t.ok(layer.div.firstChild === backBuffer,
|
||||
t.ok(map.layerContainerDiv.firstChild === backBuffer,
|
||||
'back buffer inserted as first child');
|
||||
t.eq(layer.backBuffer.style.left, '250px',
|
||||
'back buffer has correct left');
|
||||
@@ -1063,7 +1063,7 @@
|
||||
layer.applyBackBuffer(2);
|
||||
t.ok(layer.backBuffer === backBuffer,
|
||||
'back buffer set in layer');
|
||||
t.ok(layer.div.firstChild === backBuffer,
|
||||
t.ok(map.layerContainerDiv.firstChild === backBuffer,
|
||||
'back buffer inserted as first child');
|
||||
t.eq(layer.backBuffer.style.left, '230px',
|
||||
'back buffer has correct left');
|
||||
|
||||
Reference in New Issue
Block a user