making 1 the default for layer opacity. p=mosesonline,me r=me (closes #3441)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -466,7 +466,7 @@ OpenLayers.Format.OWSContext.v0_3_1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
name: layer.params.LAYERS,
|
name: layer.params.LAYERS,
|
||||||
queryable: layer.queryable ? "1" : "0",
|
queryable: layer.queryable ? "1" : "0",
|
||||||
hidden: layer.visibility ? "0" : "1",
|
hidden: layer.visibility ? "0" : "1",
|
||||||
opacity: layer.opacity ? layer.opacity: null}
|
opacity: layer.hasOwnProperty("opacity") ? layer.opacity : null}
|
||||||
});
|
});
|
||||||
this.writeNode("ows:Title", layer.name, node);
|
this.writeNode("ows:Title", layer.name, node);
|
||||||
this.writeNode("ows:OutputFormat", layer.params.FORMAT, node);
|
this.writeNode("ows:OutputFormat", layer.params.FORMAT, node);
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ OpenLayers.Format.WMC = OpenLayers.Class(OpenLayers.Format.Context, {
|
|||||||
numZoomLevels: layer.numZoomLevels,
|
numZoomLevels: layer.numZoomLevels,
|
||||||
units: layer.units,
|
units: layer.units,
|
||||||
isBaseLayer: layer.isBaseLayer,
|
isBaseLayer: layer.isBaseLayer,
|
||||||
opacity: layer.opacity,
|
opacity: layer.opacity == 1 ? undefined : layer.opacity,
|
||||||
displayInLayerSwitcher: layer.displayInLayerSwitcher,
|
displayInLayerSwitcher: layer.displayInLayerSwitcher,
|
||||||
singleTile: layer.singleTile,
|
singleTile: layer.singleTile,
|
||||||
tileSize: (layer.singleTile || !layer.tileSize) ?
|
tileSize: (layer.singleTile || !layer.tileSize) ?
|
||||||
|
|||||||
@@ -35,9 +35,10 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Property: opacity
|
* Property: opacity
|
||||||
* {Float} The layer's opacity. Float number between 0.0 and 1.0.
|
* {Float} The layer's opacity. Float number between 0.0 and 1.0. Default
|
||||||
|
* is 1.
|
||||||
*/
|
*/
|
||||||
opacity: null,
|
opacity: 1,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APIProperty: alwaysInRange
|
* APIProperty: alwaysInRange
|
||||||
@@ -349,7 +350,7 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
this.div.style.width = "100%";
|
this.div.style.width = "100%";
|
||||||
this.div.style.height = "100%";
|
this.div.style.height = "100%";
|
||||||
this.div.dir = "ltr";
|
this.div.dir = "ltr";
|
||||||
if (this.opacity != null) {
|
if (this.opacity != null && this.opacity < 1) {
|
||||||
OpenLayers.Util.modifyDOMElement(
|
OpenLayers.Util.modifyDOMElement(
|
||||||
this.div, null, null, null, null, null, null, this.opacity
|
this.div, null, null, null, null, null, null, this.opacity
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user