update Control, Marker, and Popup such that they all have draw(px) and move(px) functions. standardization. update tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@255 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -11,7 +11,10 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
||||
},
|
||||
|
||||
draw: function() {
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
draw: function(px) {
|
||||
// initialize our internal div
|
||||
OpenLayers.Control.prototype.draw.apply(this);
|
||||
|
||||
@@ -19,13 +22,12 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
this.buttons = new Array();
|
||||
|
||||
var sz = new OpenLayers.Size(18,18);
|
||||
var xy = new OpenLayers.Pixel(4,4);
|
||||
var centered = new OpenLayers.Pixel(xy.x+sz.w/2, xy.y);
|
||||
var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y);
|
||||
|
||||
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.add(sz.w, 0), sz);
|
||||
px.y = centered.y+sz.h;
|
||||
this._addButton("panleft", "west-mini.png", px, sz);
|
||||
this._addButton("panright", "east-mini.png", px.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);
|
||||
|
||||
Reference in New Issue
Block a user