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