Changeset 3377

Show
Ignore:
Timestamp:
02/23/10 17:56:40 (2 years ago)
Author:
fvanderbiest
Message:

gislars/sipv sandbox: applied OL patch #2406

Location:
sandbox/gislars/sipv/MapFish/client/mfbase/openlayers
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • sandbox/gislars/sipv/MapFish/client/mfbase/openlayers/lib/OpenLayers/Tile/Image/IFrame.js

    r3273 r3377  
    123123        // we need this reference to check back the viewRequestID 
    124124        this.imgDiv.map = this.layer.map; 
    125  
    126         //bind a listener to the onload of the iframe so that we  
    127         // can register when a tile has finished loading. 
    128         var onload = function() { 
    129             this.show(); 
    130             //normally isLoading should always be true here but there are some  
    131             // right funky conditions where loading and then reloading a tile 
    132             // with the same url *really*fast*. this check prevents sending  
    133             // a 'loadend' if the msg has already been sent 
    134             // 
    135             if (this.isLoading) {  
    136                 this.isLoading = false;  
    137                 this.events.triggerEvent("loadend");  
    138             } 
    139         }; 
    140125    }, 
    141126 
     
    206191        OpenLayers.Util.modifyDOMElement(iframe, id,  
    207192            new OpenLayers.Pixel(0,0), this.layer.getImageSize(), "absolute"); 
     193 
     194        //bind a listener to the onload of the iframe so that we 
     195        // can register when a tile has finished loading. 
     196        var onload = function() { 
     197            this.show(); 
     198            //normally isLoading should always be true here but there are some 
     199            // right funky conditions where loading and then reloading a tile 
     200            // with the same url *really*fast*. this check prevents sending 
     201            // a 'loadend' if the msg has already been sent 
     202            // 
     203            if (this.isLoading) { 
     204                this.isLoading = false; 
     205                this.events.triggerEvent("loadend"); 
     206            } 
     207        }; 
     208        OpenLayers.Event.observe(iframe, 'load', 
     209            OpenLayers.Function.bind(onload, this)); 
    208210 
    209211        return iframe; 
  • sandbox/gislars/sipv/MapFish/client/mfbase/openlayers/tests/Tile/Image/IFrame.html

    r3273 r3377  
    104104        map.addLayer(layer);   
    105105        var tile = new OpenLayers.Tile.Image.IFrame(layer, position, bounds, url, size); 
    106         var imgDiv    = tile.createImgDiv(); 
     106        tile.renderTile(); 
     107        var imgDiv = tile.imgDiv; 
    107108        var iFrame    = imgDiv.firstChild; 
    108109        var eventPane = imgDiv.childNodes[1];