replace Size instances with simple object

This commit is contained in:
fredj
2012-01-09 09:51:13 +01:00
committed by Frederic Junod
parent 4844baf666
commit 07e3fa9624
4 changed files with 15 additions and 14 deletions

View File

@@ -533,11 +533,12 @@ OpenLayers.Popup = OpenLayers.Class({
} else {
//make a new OL.Size object with the clipped dimensions
// make a new 'size' object with the clipped dimensions
// set or null if not clipped.
var fixedSize = new OpenLayers.Size();
fixedSize.w = (safeSize.w < realSize.w) ? safeSize.w : null;
fixedSize.h = (safeSize.h < realSize.h) ? safeSize.h : null;
var fixedSize = {
w: (safeSize.w < realSize.w) ? safeSize.w : null,
h: (safeSize.h < realSize.h) ? safeSize.h : null
};
if (fixedSize.w && fixedSize.h) {
//content is too big in both directions, so we will use
@@ -872,7 +873,7 @@ OpenLayers.Popup = OpenLayers.Class({
addCloseBox: function(callback) {
this.closeDiv = OpenLayers.Util.createDiv(
this.id + "_close", null, new OpenLayers.Size(17, 17)
this.id + "_close", null, {w: 17, h: 17}
);
this.closeDiv.className = "olPopupCloseBox";