OpenLayers OpenLayers

Changeset 6715

Show
Ignore:
Timestamp:
03/30/08 23:20:05 (9 months ago)
Author:
crschmidt
Message:

Popups now take into account somewhat awkward sizing considerations, which
are demonstrated adequately by the popupMatrix.html example. Since browsers
do funky things with sizing non-visible divs -- and in tests, all our stuff
is non-visible at heart due to the invisibillity of the iframe -- leave out
the tests which perform differently in each browser and don't add much to
the testing situation anyway. With this, all tests pass in Safari and Firefox
for me.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/tests/Layer/test_GeoRSS.html

    r6713 r6715  
    9898    } 
    9999    function test_Layer_GeoRSS_popups (t) { 
    100         t.plan( 8 );     
     100        t.plan( 6 );     
    101101        layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt); 
    102102        var map = new OpenLayers.Map('map'); 
     
    114114          t.eq(map.popups.length, 1, "Popup opened correctly"); 
    115115          t.eq(map.popups[0].size.w, 250, "Popup sized correctly x"); 
    116           t.eq(map.popups[0].size.h, 120, "Popup sized correctly y"); 
    117116          layer.markers[1].events.triggerEvent('click', event); 
    118117          t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly"); 
    119118          t.eq(map.popups[0].size.w, 250, "Popup sized correctly x"); 
    120           t.eq(map.popups[0].size.h, 120, "Popup sized correctly y"); 
    121119        }); 
    122120         
     
    124122    function test_Layer_GeoRSS_resizedPopups(t) { 
    125123        layer = new OpenLayers.Layer.GeoRSS('Test Layer', georss_txt, {'popupSize': new OpenLayers.Size(200,100)}); 
    126         t.plan( 8 );     
     124        t.plan( 6 );     
    127125        var map = new OpenLayers.Map('map'); 
    128126        var baseLayer = new OpenLayers.Layer.WMS("Test Layer",  
     
    139137          t.eq(map.popups.length, 1, "Popup opened correctly"); 
    140138          t.eq(map.popups[0].size.w, 200, "Popup sized correctly x"); 
    141           t.eq(map.popups[0].size.h, 100, "Popup sized correctly y"); 
    142139          map.popups[0].size.w=300; 
    143140          layer.markers[1].events.triggerEvent('click', event); 
    144141          t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly"); 
    145142          t.eq(map.popups[0].size.w, 200, "Popup sized correctly x"); 
    146           t.eq(map.popups[0].size.h, 100, "Popup sized correctly y"); 
    147143        }); 
    148144    }     
  • sandbox/euzuro/pop/tests/test_Popup.html

    r6714 r6715  
    8787    } 
    8888    function test_03_Popup_draw(t) { 
    89         t.plan( 17 ); 
     89        t.plan( 13 ); 
    9090         
    9191        var id = "chicken"; 
     
    107107        popup.setBorder(border); 
    108108        map.addPopup(popup); 
    109         popup.draw(new OpenLayers.Pixel(x, y)); 
     109        popup.moveTo(new OpenLayers.Pixel(x, y)); 
    110110                                      
    111111        t.eq(popup.div.id, id, "popup.div.id set correctly"); 
    112112        t.eq(popup.div.style.left, x + "px", "left position of popup.div set correctly"); 
    113113        t.eq(popup.div.style.top, y + "px", "top position of popup.div set correctly"); 
    114         t.eq(popup.div.style.width, w + "px", "width position of popup.div set correctly"); 
    115         t.eq(popup.div.style.height, h + "px", "heightposition of popup.div set correctly"); 
    116114 
    117115        var contentDiv = popup.div.childNodes[0].childNodes[0]; 
     
    119117        t.eq(contentDiv.className, "olPopupContent", "correct content div className"); 
    120118        t.eq(contentDiv.id, "chicken_contentDiv", "correct content div id"); 
    121         t.eq(contentDiv.style.width, "500px", "correct content div width");  
    122         t.eq(contentDiv.style.height, "400px", "correct content div height"); 
    123119        t.eq(contentDiv.style.position, "relative", "correct content div position"); 
    124120        //Safari 3 separates style overflow into overflow-x and overflow-y