Inherit layer group zIndex

This commit is contained in:
Maximilian Krög
2021-05-09 00:39:53 +02:00
parent d52497a722
commit de4a93709a
4 changed files with 91 additions and 11 deletions
+1 -2
View File
@@ -111,8 +111,7 @@ class BaseLayer extends BaseObject {
state.sourceState = this.getSourceState();
state.visible = this.getVisible();
state.extent = this.getExtent();
state.zIndex =
zIndex !== undefined ? zIndex : state.managed === false ? Infinity : 0;
state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;
state.maxResolution = this.getMaxResolution();
state.minResolution = Math.max(this.getMinResolution(), 0);
state.minZoom = this.getMinZoom();