Don't place the MouseToolbar twice. Fixes #537.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2007-03-19 19:46:42 +00:00
parent ef53b9d6a3
commit e266f430ca

View File

@@ -46,7 +46,7 @@ OpenLayers.Control.MouseToolbar.prototype =
OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments); OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments);
this.buttons = new Object(); this.buttons = new Object();
var sz = new OpenLayers.Size(28,28); var sz = new OpenLayers.Size(28,28);
var centered = this.position; var centered = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);
this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area"); this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area");
centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0));
this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan."); this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan.");