diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index 273c795d7b..3fb05dae09 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -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; }, diff --git a/lib/OpenLayers/Control/PanZoom.js b/lib/OpenLayers/Control/PanZoom.js index 4552557c29..509c695a9d 100644 --- a/lib/OpenLayers/Control/PanZoom.js +++ b/lib/OpenLayers/Control/PanZoom.js @@ -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; }, diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index ca58ed9485..3dbc0d210c 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -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) { diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index b9a7416a7c..0a1d571cef 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -79,29 +79,6 @@ OpenLayers.Pixel.prototype = { return ((d.w==0) && (d.h==0)); }, - - /** Return a new Pixel with this pixel's x&y augmented by - * the Size value passed in. - * - * @param {int} w - * - * @return {OpenLayers.Pixel} - */ - addX:function(w) { - return new OpenLayers.Pixel(this.x+w, this.y); - }, - - /** Return a new Pixel with this pixel's y augmented by - * the int value passed in. - * - * @param {int} h - * - * @return {OpenLayers.Pixel} - */ - addY:function(h) { - return new OpenLayers.Pixel(this.x, this.y+h); - }, - /** Return a new Pixel with this pixel's x&y augmented by * the int values passed in. *