Changeset 8305

Show
Ignore:
Timestamp:
04/26/07 11:02:55 (21 months ago)
Author:
sjmiles
Message:

Help fx.html work in IE: ensure integer endHeight, set overflow: hidden to allow resizing test node. Refs #2848.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/tests/_base/fx.html

    r8265 r8305  
    6363                                                        runTest: function(t){ 
    6464                                                                var duration = 500; 
    65                                                                 var foo = dojo.byId("foo"); 
    66                                                                 var startHeight = dojo.marginBox(foo).h;  
    67                                                                 //console.debug("Start height is "+startHeight); 
     65                                                                var startHeight = dojo.marginBox("foo").h;  
     66                                                                var endHeight = Math.round(startHeight / 2); 
    6867                                                                 
    6968                                                                var anim = dojo.animateProperty({ 
    7069                                                                        node: foo, 
    71                                                                         properties: { height: { end: startHeight / 2 } }, 
     70                                                                        properties: { height: { end: endHeight } }, 
    7271                                                                        duration: duration 
    7372                                                                }); 
     
    7675 
    7776                                                                dojo.connect(anim, "onEnd", anim, function(){ 
    78                                                                         var height = dojo.marginBox(foo).h;  
    79                                                                         //console.debug("End height is "+height); 
    80  
    8177                                                                        var elapsed = (new Date().valueOf()) - anim._startTime; 
    8278                                                                        t.assertTrue(elapsed >= duration); 
    83  
    84                                                                         //console.debug("dojo.contentBox(foo).h): "+height+"\nIntended Height: "+(startHeight/2)); 
    85  
    86                                                                         t.is(height, startHeight / 2); 
     79                                                                        var height = dojo.marginBox("foo").h;  
     80                                                                        t.is(height, endHeight); 
    8781                                                                        d.callback(true); 
    8882                                                                }); 
     83                                                                 
    8984                                                                anim.play(); 
    9085                                                                return d; 
     
    122117                                -khtml-box-sizing: border-box; 
    123118                                box-sizing: border-box; 
     119                                overflow: hidden; 
    124120                                /* position: absolute; */ 
    125121                        }