Add 'unmanaged' to ol.layer.LayerState

This commit is contained in:
Andreas Hocevar
2015-06-11 10:17:11 +02:00
parent 4aa3ef59d5
commit 5a2a7d30e6
3 changed files with 14 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ ol.layer.LayerProperty = {
* saturation: number,
* sourceState: ol.source.State,
* visible: boolean,
* unmanaged: boolean,
* extent: (ol.Extent|undefined),
* maxResolution: number,
* minResolution: number}}
@@ -142,6 +143,7 @@ ol.layer.Base.prototype.getLayerState = function() {
saturation: Math.max(saturation, 0),
sourceState: sourceState,
visible: visible,
unmanaged: false,
extent: extent,
maxResolution: maxResolution,
minResolution: Math.max(minResolution, 0)

View File

@@ -63,6 +63,7 @@ describe('ol.layer.Layer', function() {
opacity: 1,
saturation: 1,
visible: true,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: Infinity,
@@ -107,6 +108,7 @@ describe('ol.layer.Layer', function() {
opacity: 0.5,
saturation: 5,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: 500,
@@ -200,6 +202,7 @@ describe('ol.layer.Layer', function() {
opacity: 0.3,
saturation: 0.3,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: 500,
@@ -222,6 +225,7 @@ describe('ol.layer.Layer', function() {
opacity: 0,
saturation: 0,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: Infinity,
@@ -242,6 +246,7 @@ describe('ol.layer.Layer', function() {
opacity: 1,
saturation: 42,
visible: true,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: Infinity,

View File

@@ -51,6 +51,7 @@ describe('ol.layer.Group', function() {
opacity: 1,
saturation: 1,
visible: true,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: Infinity,
@@ -179,6 +180,7 @@ describe('ol.layer.Group', function() {
opacity: 0.5,
saturation: 5,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: 500,
@@ -230,6 +232,7 @@ describe('ol.layer.Group', function() {
opacity: 0.5,
saturation: 5,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: groupExtent,
maxResolution: 500,
@@ -275,6 +278,7 @@ describe('ol.layer.Group', function() {
opacity: 0.3,
saturation: 0.3,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: groupExtent,
maxResolution: 500,
@@ -297,6 +301,7 @@ describe('ol.layer.Group', function() {
opacity: 0,
saturation: 0,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: Infinity,
@@ -317,6 +322,7 @@ describe('ol.layer.Group', function() {
opacity: 1,
saturation: 42,
visible: true,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: Infinity,
@@ -491,6 +497,7 @@ describe('ol.layer.Group', function() {
opacity: 0.25,
saturation: 25,
visible: false,
unmanaged: false,
sourceState: ol.source.State.READY,
extent: undefined,
maxResolution: 150,