Skip to content

Commit

Permalink
Merge pull request openlayers#214 from fredj/popup-css
Browse files Browse the repository at this point in the history
Move the popup close box sizing to CSS. r=ahocevar
  • Loading branch information
fredj committed Feb 12, 2012
2 parents 3fae6c0 + 134f244 commit d106aab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/OpenLayers/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
3 changes: 3 additions & 0 deletions notes/2.12.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
2 changes: 2 additions & 0 deletions theme/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ div.olControlSaveFeaturesItemInactive {

.olPopupCloseBox {
background: url("img/close.gif") no-repeat;
width: 17px;
height: 17px;
cursor: pointer;
}

Expand Down

0 comments on commit d106aab

Please sign in to comment.