Remove deprecated roundedCorner option from LayerSwitcher control.
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
/**
|
/**
|
||||||
* @requires OpenLayers/Control.js
|
* @requires OpenLayers/Control.js
|
||||||
* @requires OpenLayers/Lang.js
|
* @requires OpenLayers/Lang.js
|
||||||
* @requires OpenLayers/Console.js
|
|
||||||
* @requires OpenLayers/Util.js
|
* @requires OpenLayers/Util.js
|
||||||
* @requires OpenLayers/Events/buttonclick.js
|
* @requires OpenLayers/Events/buttonclick.js
|
||||||
*/
|
*/
|
||||||
@@ -24,26 +23,7 @@
|
|||||||
* Inherits from:
|
* Inherits from:
|
||||||
* - <OpenLayers.Control>
|
* - <OpenLayers.Control>
|
||||||
*/
|
*/
|
||||||
OpenLayers.Control.LayerSwitcher =
|
OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, {
|
||||||
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
|
* Property: layerStates
|
||||||
@@ -120,10 +100,6 @@ OpenLayers.Control.LayerSwitcher =
|
|||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||||
this.layerStates = [];
|
this.layerStates = [];
|
||||||
|
|
||||||
if(this.roundedCorner) {
|
|
||||||
OpenLayers.Console.warn('roundedCorner option is deprecated');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -514,16 +490,6 @@ OpenLayers.Control.LayerSwitcher =
|
|||||||
|
|
||||||
this.div.appendChild(this.layersDiv);
|
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
|
// maximize button div
|
||||||
var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
|
var img = OpenLayers.Util.getImageLocation('layer-switcher-maximize.png');
|
||||||
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
|
this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv(
|
||||||
|
|||||||
@@ -144,3 +144,9 @@ file in your build (or add it in a separate `<script>` tag after
|
|||||||
OpenLayers.js).
|
OpenLayers.js).
|
||||||
|
|
||||||
* OpenLayers.Layer.Popup.AnchoredBubble
|
* 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user