replaced calls to addX and addY with calls to add. Simplify
git-svn-id: http://svn.openlayers.org/trunk/openlayers@51 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -19,7 +19,7 @@ OpenLayers.Control.LayerSwitcher.prototype =
|
||||
div.ondblclick = this.doubleClick.bindAsEventListener(div);
|
||||
div.onmousedown = this.singleClick.bindAsEventListener(div);
|
||||
this.div.appendChild(div);
|
||||
pixel = pixel.addY(35);
|
||||
pixel = pixel.add(0, 35);
|
||||
}
|
||||
return this.div;
|
||||
},
|
||||
|
||||
@@ -28,10 +28,10 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
this._addButton("panup", "north-mini.png", centered, sz);
|
||||
xy.y = centered.y+sz.h;
|
||||
this._addButton("panleft", "west-mini.png", xy, sz);
|
||||
this._addButton("panright", "east-mini.png", xy.addX(sz.w), sz);
|
||||
this._addButton("pandown", "south-mini.png", centered.addY(sz.h*2), sz);
|
||||
this._addButton("zoomin", "zoom-plus-mini.png", centered.addY(sz.h*3), sz);
|
||||
centered = centered.addY(sz.h*4);
|
||||
this._addButton("panright", "east-mini.png", xy.add(sz.w, 0), sz);
|
||||
this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz);
|
||||
this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3), sz);
|
||||
centered = centered.add(0, sz.h*4);
|
||||
this._addButton("zoomout", "zoom-minus-mini.png", centered, sz);
|
||||
return this.div;
|
||||
},
|
||||
|
||||
@@ -28,10 +28,10 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
this._addButton("panup", "north-mini.png", centered, sz);
|
||||
xy.y = centered.y+sz.h;
|
||||
this._addButton("panleft", "west-mini.png", xy, sz);
|
||||
this._addButton("panright", "east-mini.png", xy.addX(sz.w), sz);
|
||||
this._addButton("pandown", "south-mini.png", centered.addY(sz.h*2), sz);
|
||||
this._addButton("zoomin", "zoom-plus-mini.png", centered.addY(sz.h*3), sz);
|
||||
centered = centered.addY(sz.h*4);
|
||||
this._addButton("panright", "east-mini.png", xy.add(sz.w, 0), sz);
|
||||
this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz);
|
||||
this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3), sz);
|
||||
centered = centered.add(0, sz.h*4);
|
||||
centered = this._addZoomBar(centered,sz.copyOf());
|
||||
this._addButton("zoomout", "zoom-minus-mini.png", centered, sz);
|
||||
return this.div;
|
||||
@@ -40,7 +40,7 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
var zoomStopSize = 15;
|
||||
var slider = OpenLayers.Util.createImage("img/slider.png",
|
||||
new OpenLayers.Pixel(22,9),
|
||||
centered.addY((this.map.getZoomLevels())*zoomStopSize), "absolute",
|
||||
centered.add(0, (this.map.getZoomLevels())*zoomStopSize), "absolute",
|
||||
"OpenLayers_Control_PanZoom_Slider");
|
||||
sz.h = zoomStopSize*(this.map.getZoomLevels()+1);
|
||||
sz.w = 17;
|
||||
@@ -62,7 +62,7 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
slider.zIndex = this.div.zIndex + 5;
|
||||
this.div.appendChild(slider);
|
||||
this.buttons.append(slider);
|
||||
centered = centered.addY(zoomStopSize*(this.map.getZoomLevels()+1));
|
||||
centered = centered.add(0, zoomStopSize*(this.map.getZoomLevels()+1));
|
||||
return centered;
|
||||
},
|
||||
getMousePosition: function (evt) {
|
||||
|
||||
Reference in New Issue
Block a user