Remove deprecated roundedCorner option from LayerSwitcher control.

This commit is contained in:
Frederic Junod
2012-04-02 09:44:03 +02:00
parent 5a3c06aa7e
commit 5ed18a9708
2 changed files with 10 additions and 38 deletions

View File

@@ -6,7 +6,6 @@
/**
* @requires OpenLayers/Control.js
* @requires OpenLayers/Lang.js
* @requires OpenLayers/Console.js
* @requires OpenLayers/Util.js
* @requires OpenLayers/Events/buttonclick.js
*/
@@ -24,30 +23,11 @@
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.LayerSwitcher =
OpenLayers.Class(OpenLayers.Control, {
OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, {
/**
* APIProperty: roundedCorner
* {Boolean} If true the Rico library is used for rounding the corners
* of the layer switcher div, defaults to false. *Deprecated*. Use
* CSS3's border-radius instead. If this option is set to true the
* Rico/Corner.js script must be loaded in the page, and therefore
* listed in the build profile.
*
*/
roundedCorner: false,
/**
* APIProperty: roundedCornerColor
* {String} The color of the rounded corners, only applies if roundedCorner
* is true, defaults to "darkblue".
*/
roundedCornerColor: "darkblue",
/**
* Property: layerStates
* {Array(Object)} Basically a copy of the "state" of the map's layers
/**
* Property: layerStates
* {Array(Object)} Basically a copy of the "state" of the map's layers
* the last time the control was drawn. We have this in order to avoid
* unnecessarily redrawing the control.
*/
@@ -120,10 +100,6 @@ OpenLayers.Control.LayerSwitcher =
initialize: function(options) {
OpenLayers.Control.prototype.initialize.apply(this, arguments);
this.layerStates = [];
if(this.roundedCorner) {
OpenLayers.Console.warn('roundedCorner option is deprecated');
}
},
/**
@@ -514,16 +490,6 @@ OpenLayers.Control.LayerSwitcher =
this.div.appendChild(this.layersDiv);
if(this.roundedCorner) {
OpenLayers.Rico.Corner.round(this.div, {
corners: "tl bl",
bgColor: "transparent",
color: this.roundedCornerColor,
blend: false
});
OpenLayers.Rico.Corner.changeOpacity(this.layersDiv, 0.75);
}
// maximize button div
var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(

View File

@@ -144,3 +144,9 @@ file in your build (or add it in a separate `<script>` tag after
OpenLayers.js).
* OpenLayers.Layer.Popup.AnchoredBubble
## LayerSwitcher rounded corner removal
The deprecated `roundedCorner` and `roundedCornerColor` options have
been removed from the `OpenLayers.Control.LayerSwitcher` control. Use
CSS3's border-radius instead.