OpenLayers OpenLayers

Changeset 5399

Show
Ignore:
Timestamp:
12/13/07 14:51:49 (8 months ago)
Author:
crschmidt
Message:

Box Handler should use CSS to style its box. (Closes #1070)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Handler/Box.js

    r4985 r5399  
    2121     */ 
    2222    dragHandler: null, 
     23 
     24    /** 
     25     * APIProperty: boxDivClassName 
     26     * {String} The CSS class to use for drawing the box. Default is 
     27     *     olHandlerBoxZoomBox 
     28     */ 
     29    boxDivClassName: 'olHandlerBoxZoomBox', 
    2330 
    2431    /** 
     
    6370    startBox: function (xy) { 
    6471        this.zoomBox = OpenLayers.Util.createDiv('zoomBox', 
    65                                                  this.dragHandler.start, 
    66                                                  null, 
    67                                                  null, 
    68                                                  "absolute", 
    69                                                  "2px solid red"); 
    70         this.zoomBox.style.backgroundColor = "white"; 
    71         this.zoomBox.style.filter = "alpha(opacity=50)"; // IE 
    72         this.zoomBox.style.opacity = "0.50"; 
    73         this.zoomBox.style.fontSize = "1px"; 
     72                                                 this.dragHandler.start); 
     73        this.zoomBox.className = this.boxDivClassName;                                          
    7474        this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; 
    7575        this.map.viewPortDiv.appendChild(this.zoomBox); 
  • trunk/openlayers/theme/default/style.css

    r4301 r5399  
    160160  background-repeat: no-repeat; 
    161161} 
     162 
     163.olHandlerBoxZoomBox { 
     164    border: 2px solid red; 
     165    position: absolute; 
     166    background-color: white; 
     167    opacity: 0.50; 
     168    font-size: 1px; 
     169    filter: alpha(opacity=50); 
     170}