From e54c008a98a35be1663f5da8cc81306071cd5021 Mon Sep 17 00:00:00 2001 From: euzuro Date: Fri, 26 May 2006 01:42:32 +0000 Subject: [PATCH] more updates i missed in r384 git-svn-id: http://svn.openlayers.org/trunk/openlayers@385 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Control/PanZoomBar.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index 2d4635f98c..0c220a2c84 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -52,10 +52,12 @@ OpenLayers.Control.PanZoomBar.prototype = var imgLocation = OpenLayers.Util.getImagesLocation(); var zoomStopSize = this.zoomStopHeight; - var slider = OpenLayers.Util.createAlphaImageDiv(imgLocation+"slider.png", + var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id; + var slider = OpenLayers.Util.createAlphaImageDiv(id, + centered.add(-1, (this.map.getZoomLevels())*zoomStopSize), new OpenLayers.Size(20,9), - centered.add(-1, (this.map.getZoomLevels())*zoomStopSize), "absolute", - "OpenLayers_Control_PanZoomBar_Slider" + this.map.id); + imgLocation+"slider.png", + "absolute"); slider.style.zIndex = this.div.zIndex + 5; this.slider = slider; @@ -68,10 +70,13 @@ OpenLayers.Control.PanZoomBar.prototype = sz.h = zoomStopSize*(this.map.getZoomLevels()+1); sz.w = this.zoomStopWidth; var div = null - if ((document.body.filters && (version >= 5.5) && (version < 7))) { - div = OpenLayers.Util.createAlphaImageDiv(imgLocation+"zoombar.png", - new OpenLayers.Size(sz.w, zoomStopSize), - centered, "absolute", "OpenLayers_Control_PanZoomBar" + this.map.id); + + if (OpenLayers.Util.alphaHack()) { + var id = "OpenLayers_Control_PanZoomBar" + this.map.id; + div = OpenLayers.Util.createAlphaImageDiv(id, centered, + new OpenLayers.Size(sz.w, zoomStopSize), + imgLocation + "zoombar.png", + "absolute"); div.style.height = sz.h; } else { div = OpenLayers.Util.createDiv( @@ -80,6 +85,7 @@ OpenLayers.Control.PanZoomBar.prototype = sz, imgLocation+"zoombar.png"); } + this.divEvents = new OpenLayers.Events(this, div); this.divEvents.register("mousedown", this, this.divClick); this.divEvents.register("mousemove", this, this.zoomBarDivDrag);