Merge pull request #99 from elemoine/deprecate-rico

Deprecate Popup.AnchoredBubble and Rico
This commit is contained in:
Éric Lemoine
2011-12-08 22:54:38 -08:00
13 changed files with 48 additions and 410 deletions

View File

@@ -6,7 +6,7 @@
/**
* @requires OpenLayers/Control.js
* @requires OpenLayers/Lang.js
* @requires Rico/Corner.js
* @requires OpenLayers/Console.js
*/
/**
@@ -28,9 +28,13 @@ OpenLayers.Control.LayerSwitcher =
/**
* APIProperty: roundedCorner
* {Boolean} If true the Rico library is used for rounding the corners
* of the layer switcher div, defaults to true.
* 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: true,
roundedCorner: false,
/**
* APIProperty: roundedCornerColor
@@ -115,6 +119,10 @@ 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');
}
},
/**

View File

@@ -49,7 +49,7 @@ OpenLayers.Feature = OpenLayers.Class({
/**
* APIProperty: popupClass
* {<OpenLayers.Class>} The class which will be used to instantiate
* a new Popup. Default is <OpenLayers.Popup.AnchoredBubble>.
* a new Popup. Default is <OpenLayers.Popup.Anchored>.
*/
popupClass: null,
@@ -188,7 +188,7 @@ OpenLayers.Feature = OpenLayers.Class({
if (!this.popup) {
var anchor = (this.marker) ? this.marker.icon : null;
var popupClass = this.popupClass ?
this.popupClass : OpenLayers.Popup.AnchoredBubble;
this.popupClass : OpenLayers.Popup.Anchored;
this.popup = new popupClass(this.id + "_popup",
this.lonlat,
this.data.popupSize,

View File

@@ -162,8 +162,8 @@ OpenLayers.Popup.Anchored =
*
* Note that in the classic Anchored popup, there is nothing to do
* here, since the popup looks exactly the same in all four positions.
* Subclasses such as the AnchoredBubble and Framed, however, will
* want to do something special here.
* Subclasses such as Framed, however, will want to do something
* special here.
*/
updateRelativePosition: function() {
//to be overridden by subclasses

View File

@@ -6,11 +6,14 @@
/**
* @requires OpenLayers/Popup/Anchored.js
* @requires OpenLayers/Console.js
* @requires Rico/Corner.js
*/
/**
* Class: OpenLayers.Popup.AnchoredBubble
* This class is *deprecated*. Use {<OpenLayers.Popup.Anchored>} and
* round corners using CSS3's border-radius property.
*
* Inherits from:
* - <OpenLayers.Popup.Anchored>
@@ -40,6 +43,8 @@ OpenLayers.Popup.AnchoredBubble =
*/
initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox,
closeBoxCallback) {
OpenLayers.Console.warn('AnchoredBubble is deprecated');
this.padding = new OpenLayers.Bounds(
0, OpenLayers.Popup.AnchoredBubble.CORNER_SIZE,