Revert "Move the popup close box sizing to CSS"
Moving the box size to CSS broke `Popup.setSize()`; the function
expects a width for the padding computation. Because this function is
called before the div is added to the DOM, the size can't be
computed.
This reverts commit 134f24480a.
This commit is contained in:
@@ -872,11 +872,13 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
*/
|
||||
addCloseBox: function(callback) {
|
||||
|
||||
this.closeDiv = OpenLayers.Util.createDiv(this.id + "_close");
|
||||
this.closeDiv = OpenLayers.Util.createDiv(
|
||||
this.id + "_close", null, {w: 17, h: 17}
|
||||
);
|
||||
this.closeDiv.className = "olPopupCloseBox";
|
||||
|
||||
// use the content div's css padding to determine if we should
|
||||
// pad the close div
|
||||
// padd the close div
|
||||
var contentDivPadding = this.getContentDivPadding();
|
||||
|
||||
this.closeDiv.style.right = contentDivPadding.right + "px";
|
||||
|
||||
Reference in New Issue
Block a user