This patch causes the zoomBox to become visible again, after the changes
to add an eventsDiv, and fixes the OverviewMap to work again. r=bartvde, (Closes #3104) git-svn-id: http://svn.openlayers.org/trunk/openlayers@11455 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -165,7 +165,7 @@ OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
this.zoomBox.style.opacity = "0.50";
|
this.zoomBox.style.opacity = "0.50";
|
||||||
this.zoomBox.style.fontSize = "1px";
|
this.zoomBox.style.fontSize = "1px";
|
||||||
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||||
this.map.viewPortDiv.appendChild(this.zoomBox);
|
this.map.eventsDiv.appendChild(this.zoomBox);
|
||||||
}
|
}
|
||||||
document.onselectstart = OpenLayers.Function.False;
|
document.onselectstart = OpenLayers.Function.False;
|
||||||
OpenLayers.Event.stop(evt);
|
OpenLayers.Event.stop(evt);
|
||||||
@@ -302,7 +302,7 @@ OpenLayers.Control.MouseDefaults = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* Remove the zoombox from the screen and nullify our reference to it.
|
* Remove the zoombox from the screen and nullify our reference to it.
|
||||||
*/
|
*/
|
||||||
removeZoomBox: function() {
|
removeZoomBox: function() {
|
||||||
this.map.viewPortDiv.removeChild(this.zoomBox);
|
this.map.eventsDiv.removeChild(this.zoomBox);
|
||||||
this.zoomBox = null;
|
this.zoomBox = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
|
|||||||
this.zoomBox.style.opacity = "0.50";
|
this.zoomBox.style.opacity = "0.50";
|
||||||
this.zoomBox.style.fontSize = "1px";
|
this.zoomBox.style.fontSize = "1px";
|
||||||
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||||
this.map.viewPortDiv.appendChild(this.zoomBox);
|
this.map.eventsDiv.appendChild(this.zoomBox);
|
||||||
this.performedDrag = true;
|
this.performedDrag = true;
|
||||||
break;
|
break;
|
||||||
case "measure":
|
case "measure":
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
this.handlers.drag.destroy();
|
this.handlers.drag.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ovmap && this.ovmap.viewPortDiv.removeChild(this.extentRectangle);
|
this.ovmap && this.ovmap.eventsDiv.removeChild(this.extentRectangle);
|
||||||
this.extentRectangle = null;
|
this.extentRectangle = null;
|
||||||
|
|
||||||
if (this.rectEvents) {
|
if (this.rectEvents) {
|
||||||
@@ -489,7 +489,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
{controls: [], maxResolution: 'auto',
|
{controls: [], maxResolution: 'auto',
|
||||||
fallThrough: false}, this.mapOptions);
|
fallThrough: false}, this.mapOptions);
|
||||||
this.ovmap = new OpenLayers.Map(this.mapDiv, options);
|
this.ovmap = new OpenLayers.Map(this.mapDiv, options);
|
||||||
this.ovmap.viewPortDiv.appendChild(this.extentRectangle);
|
this.ovmap.eventsDiv.appendChild(this.extentRectangle);
|
||||||
|
|
||||||
// prevent ovmap from being destroyed when the page unloads, because
|
// prevent ovmap from being destroyed when the page unloads, because
|
||||||
// the OverviewMap control has to do this (and does it).
|
// the OverviewMap control has to do this (and does it).
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
new OpenLayers.Pixel(-9999, -9999));
|
new OpenLayers.Pixel(-9999, -9999));
|
||||||
this.zoomBox.className = this.boxDivClassName;
|
this.zoomBox.className = this.boxDivClassName;
|
||||||
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
|
||||||
this.map.viewPortDiv.appendChild(this.zoomBox);
|
this.map.eventsDiv.appendChild(this.zoomBox);
|
||||||
|
|
||||||
OpenLayers.Element.addClass(
|
OpenLayers.Element.addClass(
|
||||||
this.map.viewPortDiv, "olDrawBox"
|
this.map.eventsDiv, "olDrawBox"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -157,11 +157,11 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* Remove the zoombox from the screen and nullify our reference to it.
|
* Remove the zoombox from the screen and nullify our reference to it.
|
||||||
*/
|
*/
|
||||||
removeBox: function() {
|
removeBox: function() {
|
||||||
this.map.viewPortDiv.removeChild(this.zoomBox);
|
this.map.eventsDiv.removeChild(this.zoomBox);
|
||||||
this.zoomBox = null;
|
this.zoomBox = null;
|
||||||
this.boxCharacteristics = null;
|
this.boxCharacteristics = null;
|
||||||
OpenLayers.Element.removeClass(
|
OpenLayers.Element.removeClass(
|
||||||
this.map.viewPortDiv, "olDrawBox"
|
this.map.eventsDiv, "olDrawBox"
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user