From 134f24480a9e6ebf0c71891e52a6b1d456ad1996 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Sun, 12 Feb 2012 21:56:41 +0100 Subject: [PATCH] Move the popup close box sizing to CSS --- lib/OpenLayers/Popup.js | 6 ++---- notes/2.12.md | 3 +++ theme/default/style.css | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 36f666e73f..f6f6e65871 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -872,13 +872,11 @@ OpenLayers.Popup = OpenLayers.Class({ */ addCloseBox: function(callback) { - this.closeDiv = OpenLayers.Util.createDiv( - this.id + "_close", null, {w: 17, h: 17} - ); + this.closeDiv = OpenLayers.Util.createDiv(this.id + "_close"); this.closeDiv.className = "olPopupCloseBox"; // use the content div's css padding to determine if we should - // padd the close div + // pad the close div var contentDivPadding = this.getContentDivPadding(); this.closeDiv.style.right = contentDivPadding.right + "px"; diff --git a/notes/2.12.md b/notes/2.12.md index 3aa2db8eda..52a122b765 100644 --- a/notes/2.12.md +++ b/notes/2.12.md @@ -145,3 +145,6 @@ In addition, OpenLayers no longer modifies any native prototypes or objects by d * Function.prototype.bindAsEventListener * Event.stop +## Popup close box size + +The size of the close box is now configurable in CSS instead of the fixed 17x17px (`.olPopupCloseBox`) diff --git a/theme/default/style.css b/theme/default/style.css index c695689ff7..703eb961c2 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -259,6 +259,8 @@ div.olControlSaveFeaturesItemInactive { .olPopupCloseBox { background: url("img/close.gif") no-repeat; + width: 17px; + height: 17px; cursor: pointer; }