backing out patch for r7647 as it breaks framedcloud popups. (See #1586)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7656 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -47,12 +47,6 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
*/
|
||||
div: null,
|
||||
|
||||
/**
|
||||
* Property: contentSize
|
||||
* {<OpenLayers.Size>} the width and height of the content.
|
||||
*/
|
||||
contentSize: null,
|
||||
|
||||
/**
|
||||
* Property: size
|
||||
* {<OpenLayers.Size>} the width and height of the popup.
|
||||
@@ -177,26 +171,24 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
* an identifier will be automatically generated.
|
||||
* lonlat - {<OpenLayers.LonLat>} The position on the map the popup will
|
||||
* be shown.
|
||||
* contentSize - {<OpenLayers.Size>} The size of the content.
|
||||
* size - {<OpenLayers.Size>} The size of the popup.
|
||||
* contentHTML - {String} The HTML content to display inside the
|
||||
* popup.
|
||||
* closeBox - {Boolean} Whether to display a close box inside
|
||||
* the popup.
|
||||
* closeBoxCallback - {Function} Function to be called on closeBox click.
|
||||
*/
|
||||
initialize:function(id, lonlat, contentSize, contentHTML, closeBox, closeBoxCallback) {
|
||||
initialize:function(id, lonlat, size, contentHTML, closeBox, closeBoxCallback) {
|
||||
if (id == null) {
|
||||
id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
|
||||
}
|
||||
|
||||
this.id = id;
|
||||
this.lonlat = lonlat;
|
||||
|
||||
this.contentSize = (contentSize != null) ? contentSize
|
||||
this.size = (size != null) ? size
|
||||
: new OpenLayers.Size(
|
||||
OpenLayers.Popup.WIDTH,
|
||||
OpenLayers.Popup.HEIGHT);
|
||||
|
||||
if (contentHTML != null) {
|
||||
this.contentHTML = contentHTML;
|
||||
}
|
||||
@@ -214,7 +206,7 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
"hidden");
|
||||
|
||||
var id = this.div.id + "_contentDiv";
|
||||
this.contentDiv = OpenLayers.Util.createDiv(id, null, this.contentSize.clone(),
|
||||
this.contentDiv = OpenLayers.Util.createDiv(id, null, this.size.clone(),
|
||||
null, "relative");
|
||||
this.contentDiv.className = 'olPopupContent';
|
||||
this.groupDiv.appendChild(this.contentDiv);
|
||||
@@ -306,8 +298,8 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
}
|
||||
|
||||
this.moveTo(px);
|
||||
if (!this.autoSize && !this.size) {
|
||||
this.setSize(this.contentSize);
|
||||
if (!this.autoSize) {
|
||||
this.setSize(this.size);
|
||||
}
|
||||
this.setBackgroundColor();
|
||||
this.setOpacity();
|
||||
@@ -398,8 +390,10 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
* size - {<OpenLayers.Size>} the new size of the popup's contents div
|
||||
* (in pixels).
|
||||
*/
|
||||
setSize:function(contentSize) {
|
||||
this.size = contentSize.clone();
|
||||
setSize:function(size) {
|
||||
this.size = size;
|
||||
|
||||
var contentSize = this.size.clone();
|
||||
|
||||
// if our contentDiv has a css 'padding' set on it by a stylesheet, we
|
||||
// must add that to the desired "size".
|
||||
@@ -427,8 +421,8 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
// div itself bigger to take its own padding into effect. this makes
|
||||
// me want to shoot someone, but so it goes.
|
||||
if (OpenLayers.Util.getBrowserName() == "msie") {
|
||||
this.contentSize.w += contentDivPadding.left + contentDivPadding.right;
|
||||
this.contentSize.h += contentDivPadding.bottom + contentDivPadding.top;
|
||||
contentSize.w += contentDivPadding.left + contentDivPadding.right;
|
||||
contentSize.h += contentDivPadding.bottom + contentDivPadding.top;
|
||||
}
|
||||
|
||||
if (this.div != null) {
|
||||
|
||||
Reference in New Issue
Block a user