Changed around the order of arguments for createImage, createDiv, and createAlphaImage. bubbled out helper function OpenLayers.Util.modifyDOMElement() to handle common mods. Official order now is: id, px, sz, imgURL, position, border[, overflow]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -30,15 +30,16 @@ OpenLayers.Control.MouseDefaults.prototype =
|
||||
this.mouseDragStart = evt.xy.copyOf();
|
||||
if (evt.shiftKey) {
|
||||
this.map.div.style.cursor = "crosshair";
|
||||
this.zoomBox = OpenLayers.Util.createDiv('zoomBox');
|
||||
this.zoomBox.style.border = '2px solid red';
|
||||
this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
|
||||
this.mouseDragStart,
|
||||
null,
|
||||
null,
|
||||
"absolute",
|
||||
"2px solid red");
|
||||
this.zoomBox.style.backgroundColor = "white";
|
||||
this.zoomBox.style.filter = "alpha(opacity=50)"; // IE
|
||||
this.zoomBox.style.opacity = "0.50";
|
||||
this.zoomBox.style.position="absolute";
|
||||
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||
this.zoomBox.style.top=this.mouseDragStart.y;
|
||||
this.zoomBox.style.left=this.mouseDragStart.x;
|
||||
this.map.viewPortDiv.appendChild(this.zoomBox);
|
||||
} else {
|
||||
this.map.div.style.cursor = "move";
|
||||
|
||||
@@ -45,8 +45,8 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation() + img;
|
||||
// var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz);
|
||||
var btn = OpenLayers.Util.createAlphaImageDiv(
|
||||
imgLocation, sz, xy, "absolute",
|
||||
"OpenLayers_Control_PanZoom_" + id );
|
||||
"OpenLayers_Control_PanZoom_" + id,
|
||||
xy, sz, imgLocation, "absolute");
|
||||
|
||||
//we want to add the outer div
|
||||
this.div.appendChild(btn);
|
||||
|
||||
@@ -75,10 +75,10 @@ OpenLayers.Control.PanZoomBar.prototype =
|
||||
div.style.height = sz.h;
|
||||
} else {
|
||||
div = OpenLayers.Util.createDiv(
|
||||
'OpenLayers_Control_PanZoomBar_Zoombar' + this.map.id,
|
||||
centered,
|
||||
sz);
|
||||
div.style.backgroundImage = "url("+imgLocation+"zoombar.png)";
|
||||
'OpenLayers_Control_PanZoomBar_Zoombar' + this.map.id,
|
||||
centered,
|
||||
sz,
|
||||
imgLocation+"zoombar.png");
|
||||
}
|
||||
this.divEvents = new OpenLayers.Events(this, div);
|
||||
this.divEvents.register("mousedown", this, this.divClick);
|
||||
|
||||
Reference in New Issue
Block a user