OpenLayers OpenLayers

Ticket #1070: box_handler_css.patch

File box_handler_css.patch, 1.9 kB (added by crschmidt, 1 year ago)
  • lib/OpenLayers/Handler/Box.js

    old new  
    2222    dragHandler: null, 
    2323 
    2424    /** 
     25     * APIProperty: boxDivClassName 
     26     * {String} The CSS class to use for drawing the box. Default is 
     27     *     olHandlerBoxZoomBox 
     28     */ 
     29    boxDivClassName: 'olHandlerBoxZoomBox', 
     30 
     31    /** 
    2532     * Constructor: OpenLayers.Handler.Box 
    2633     * 
    2734     * Parameters: 
     
    6269    */ 
    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); 
    7676 
  • theme/default/style.css

    old new  
    159159  background-image: url("img/draw_polygon_on.png"); 
    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}