OpenLayers OpenLayers

Changeset 6704

Show
Ignore:
Timestamp:
03/30/08 11:25:11 (9 months ago)
Author:
crschmidt
Message:

Although we don't hae the helper functions we need to figure out the popup
size from the CSS, we can at least control the location of the image from
CSS. This adds a className of 'olPopupCloseBox' to the box, and moves
the definition of the image location into the CSS (as well as adding a
'cursor: pointer' CSS rule so people know they can click it.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/lib/OpenLayers/Popup.js

    r6698 r6704  
    695695    addCloseBox: function(callback) { 
    696696 
    697        // close icon 
    698         var closeSize = new OpenLayers.Size(17,17); 
    699         var img = OpenLayers.Util.getImagesLocation() + "close.gif"; 
    700         this.closeDiv = OpenLayers.Util.createAlphaImageDiv( 
    701             this.id + "_close", null, closeSize, img 
     697        this.closeDiv = OpenLayers.Util.createDiv( 
     698            this.id + "_close", null, new OpenLayers.Size(17, 17) 
    702699        ); 
     700        this.closeDiv.className = "olPopupCloseBox";  
    703701         
    704702        // use the content div's css padding to determine if we should 
  • sandbox/euzuro/pop/theme/default/style.css

    r6674 r6704  
    231231    font-size: 1px; 
    232232    filter: alpha(opacity=50); 
    233 }     
     233}    
     234 
     235/*  
     236 * Due to current limitations in the OpenLayers code, you can only 
     237 * replace this image with another image which is 17px x 17px.  
     238 */    
     239.olPopupCloseBox { 
     240  background: url("../../img/close.gif") no-repeat; 
     241  cursor: pointer; 
     242