Rolling back patch from #751: this broke IE when used (destroy tries to

destroy slider even though it was never created). Thanks to the tests we
caught it, but this patch needs reworking.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@6516 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-03-13 13:44:09 +00:00
parent 31f769b61a
commit 0da40191ec
2 changed files with 16 additions and 42 deletions

View File

@@ -48,20 +48,6 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
* {<OpenLayers.Events>}
*/
divEvents: null,
/** Whether or not Pan icons will be displayed
* Default is true
*
* @type Boolean
*/
showPan: true,
/** Whether or not ZoomBar will be displayed
* Default is true
*
* @type Boolean
*/
showZoomBar: true,
/**
* Property: zoomWorldIcon
@@ -146,24 +132,19 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, {
centered = new OpenLayers.Pixel(px.x+sz.w, px.y);
}
if (this.showPan) {
this._addButton("panup", "north-mini.png", centered, sz);
px.y = centered.y+sz.h;
this._addButton("panleft", "west-mini.png", px, sz);
if (this.zoomWorldIcon) {
this._addButton("zoomworld", "zoom-world-mini.png", px.add(sz.w, 0), sz);
wposition *= 2;
}
this._addButton("panright", "east-mini.png", px.add(wposition, 0), sz);
this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz);
}
if (this.showZoomBar) {
this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3+5), sz);
centered = this._addZoomBar(centered.add(0, sz.h*4 + 5));
this._addButton("zoomout", "zoom-minus-mini.png", centered, sz);
this._addButton("panup", "north-mini.png", centered, sz);
px.y = centered.y+sz.h;
this._addButton("panleft", "west-mini.png", px, sz);
if (this.zoomWorldIcon) {
this._addButton("zoomworld", "zoom-world-mini.png", px.add(sz.w, 0), sz);
wposition *= 2;
}
this._addButton("panright", "east-mini.png", px.add(wposition, 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+5), sz);
centered = this._addZoomBar(centered.add(0, sz.h*4 + 5));
this._addButton("zoomout", "zoom-minus-mini.png", centered, sz);
return this.div;
},