replace Size instances with simple object
This commit is contained in:
@@ -151,7 +151,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
|
||||
// place the controls
|
||||
this.buttons = [];
|
||||
|
||||
var sz = new OpenLayers.Size(18,18);
|
||||
var sz = {w: 18, h: 18};
|
||||
if (this.panIcons) {
|
||||
var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y);
|
||||
var wposition = sz.w;
|
||||
@@ -198,7 +198,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
|
||||
var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom();
|
||||
var slider = OpenLayers.Util.createAlphaImageDiv(id,
|
||||
centered.add(-1, zoomsToEnd * this.zoomStopHeight),
|
||||
new OpenLayers.Size(20,9),
|
||||
{w: 20, h: 9},
|
||||
imgLocation,
|
||||
"absolute");
|
||||
slider.style.cursor = "move";
|
||||
@@ -217,17 +217,17 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
|
||||
"click": this.doubleClick
|
||||
});
|
||||
|
||||
var sz = new OpenLayers.Size();
|
||||
sz.h = this.zoomStopHeight * this.map.getNumZoomLevels();
|
||||
sz.w = this.zoomStopWidth;
|
||||
var sz = {
|
||||
w: this.zoomStopWidth,
|
||||
h: this.zoomStopHeight * this.map.getNumZoomLevels()
|
||||
};
|
||||
var imgLocation = OpenLayers.Util.getImageLocation("zoombar.png");
|
||||
var div = null;
|
||||
|
||||
if (OpenLayers.Util.alphaHack()) {
|
||||
var id = this.id + "_" + this.map.id;
|
||||
div = OpenLayers.Util.createAlphaImageDiv(id, centered,
|
||||
new OpenLayers.Size(sz.w,
|
||||
this.zoomStopHeight),
|
||||
{w: sz.w, h: this.zoomStopHeight},
|
||||
imgLocation,
|
||||
"absolute", null, "crop");
|
||||
div.style.height = sz.h + "px";
|
||||
|
||||
Reference in New Issue
Block a user