This was named the same as PanZoom, and was overriding this class when included.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@71 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-05-17 01:49:19 +00:00
parent c351058c24
commit e77be72a77

View File

@@ -4,8 +4,8 @@
//
// default zoom/pan controls
//
OpenLayers.Control.PanZoom = Class.create();
OpenLayers.Control.PanZoom.prototype =
OpenLayers.Control.PanZoomBar = Class.create();
OpenLayers.Control.PanZoomBar.prototype =
Object.extend( new OpenLayers.Control(), {
// Array(...)
buttons: null,
@@ -41,10 +41,10 @@ OpenLayers.Control.PanZoom.prototype =
var slider = OpenLayers.Util.createImage("img/slider.png",
new OpenLayers.Pixel(22,9),
centered.add(0, (this.map.getZoomLevels())*zoomStopSize), "absolute",
"OpenLayers_Control_PanZoom_Slider");
"OpenLayers_Control_PanZoomBar_Slider");
sz.h = zoomStopSize*(this.map.getZoomLevels()+1);
sz.w = 17;
var div = OpenLayers.Util.createDiv('OpenLayers_Control_PanZoom_Zoombar',centered,sz);
var div = OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar',centered,sz);
div.style.backgroundImage = "url(img/zoombar.png)";
div.onmousedown = this.doubleClick.bindAsEventListener(div);
div.onmousemove = this.zoomBarDivDrag.bindAsEventListener(div);
@@ -94,7 +94,7 @@ OpenLayers.Control.PanZoom.prototype =
var deltaY = this.zoomStart.y - evt.xy.y
this.map.zoomTo(this.map.zoom + Math.round(deltaY/15));
this.style.top = (this.map.getZoomLevels() - this.map.getZoom())*15+
parseInt(document.getElementById("OpenLayers_Control_PanZoom_Zoombar").style.top) + 3;
parseInt(document.getElementById("OpenLayers_Control_PanZoomBar_Zoombar").style.top) + 3;
this.div.style.cursor="default";
this.mouseDragStart = null;
Event.stop(evt);
@@ -104,7 +104,7 @@ OpenLayers.Control.PanZoom.prototype =
// var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz);
var btn = OpenLayers.Util.createImage(
imgLocation, sz, xy, "absolute",
"OpenLayers_Control_PanZoom_" + id );
"OpenLayers_Control_PanZoomBar_" + id );
//we want to add the outer div
this.div.appendChild(btn);