Box Handler should use CSS to style its box. (Closes #1070)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5399 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -21,6 +21,13 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
*/
|
*/
|
||||||
dragHandler: null,
|
dragHandler: null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIProperty: boxDivClassName
|
||||||
|
* {String} The CSS class to use for drawing the box. Default is
|
||||||
|
* olHandlerBoxZoomBox
|
||||||
|
*/
|
||||||
|
boxDivClassName: 'olHandlerBoxZoomBox',
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor: OpenLayers.Handler.Box
|
* Constructor: OpenLayers.Handler.Box
|
||||||
*
|
*
|
||||||
@@ -62,15 +69,8 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
*/
|
*/
|
||||||
startBox: function (xy) {
|
startBox: function (xy) {
|
||||||
this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
|
this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
|
||||||
this.dragHandler.start,
|
this.dragHandler.start);
|
||||||
null,
|
this.zoomBox.className = this.boxDivClassName;
|
||||||
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.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.viewPortDiv.appendChild(this.zoomBox);
|
||||||
|
|
||||||
|
|||||||
@@ -159,3 +159,12 @@ div.olControlMousePosition {
|
|||||||
background-image: url("img/draw_polygon_on.png");
|
background-image: url("img/draw_polygon_on.png");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.olHandlerBoxZoomBox {
|
||||||
|
border: 2px solid red;
|
||||||
|
position: absolute;
|
||||||
|
background-color: white;
|
||||||
|
opacity: 0.50;
|
||||||
|
font-size: 1px;
|
||||||
|
filter: alpha(opacity=50);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user