Move the popup close box sizing to CSS
This commit is contained in:
@@ -872,13 +872,11 @@ OpenLayers.Popup = OpenLayers.Class({
|
|||||||
*/
|
*/
|
||||||
addCloseBox: function(callback) {
|
addCloseBox: function(callback) {
|
||||||
|
|
||||||
this.closeDiv = OpenLayers.Util.createDiv(
|
this.closeDiv = OpenLayers.Util.createDiv(this.id + "_close");
|
||||||
this.id + "_close", null, {w: 17, h: 17}
|
|
||||||
);
|
|
||||||
this.closeDiv.className = "olPopupCloseBox";
|
this.closeDiv.className = "olPopupCloseBox";
|
||||||
|
|
||||||
// use the content div's css padding to determine if we should
|
// use the content div's css padding to determine if we should
|
||||||
// padd the close div
|
// pad the close div
|
||||||
var contentDivPadding = this.getContentDivPadding();
|
var contentDivPadding = this.getContentDivPadding();
|
||||||
|
|
||||||
this.closeDiv.style.right = contentDivPadding.right + "px";
|
this.closeDiv.style.right = contentDivPadding.right + "px";
|
||||||
|
|||||||
@@ -145,3 +145,6 @@ In addition, OpenLayers no longer modifies any native prototypes or objects by d
|
|||||||
* Function.prototype.bindAsEventListener
|
* Function.prototype.bindAsEventListener
|
||||||
* Event.stop
|
* Event.stop
|
||||||
|
|
||||||
|
## Popup close box size
|
||||||
|
|
||||||
|
The size of the close box is now configurable in CSS instead of the fixed 17x17px (`.olPopupCloseBox`)
|
||||||
|
|||||||
@@ -259,6 +259,8 @@ div.olControlSaveFeaturesItemInactive {
|
|||||||
|
|
||||||
.olPopupCloseBox {
|
.olPopupCloseBox {
|
||||||
background: url("img/close.gif") no-repeat;
|
background: url("img/close.gif") no-repeat;
|
||||||
|
width: 17px;
|
||||||
|
height: 17px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user