Ticket #6481: RadioGroup.js.diff

File RadioGroup.js.diff, 1.5 kB (added by guest, 9 months ago)

dojox.layout.RadioGroup?.js diff

  • dojox/layout/RadioGroup.js

     
    147147        // easing: dojo._Animation.easing 
    148148        //      A hook to override the default easing of the pane slides. 
    149149        easing: dojox.fx.easing.easeOut, 
     150         
     151        // The direction to slide in from. 
     152        // right, left, top, bottom or anything else defaults to random 
     153        slideDirection: "random", 
    150154 
    151155        startup: function(){ 
    152156                // summary: on startup, set each of the panes off-screen (_showChild is called later) 
     
    157161        _positionChild: function(page){ 
    158162                // summary: randomly set the child out of view 
    159163                // description:  
    160                 var rA = Math.round(Math.random()); 
    161                 var rB = Math.round(Math.random()); 
    162                 dojo.style(page.domNode, rA? "top" : "left", (rB ? "-" : "") + this._size[rA?"h":"w"]+"px"); 
     164                switch(this.slideDirection){ 
     165                case "top": 
     166                    dojo.style(page.domNode, "top", "-"+this._size["h"]+"px"); 
     167                    break; 
     168                case "bottom": 
     169                    dojo.style(page.domNode, "top", this._size["h"]+"px"); 
     170                    break; 
     171                case "left": 
     172                    dojo.style(page.domNode, "left", "-"+this._size["w"]+"px"); 
     173                    break; 
     174                case "right": 
     175                    dojo.style(page.domNode, "left", this._size["w"]+"px"); 
     176                    break; 
     177                default: 
     178                var rA = Math.round(Math.random()); 
     179                var rB = Math.round(Math.random()); 
     180                dojo.style(page.domNode, rA? "top" : "left", (rB ? "-" : "") + this._size[rA?"h":"w"]+"px"); 
     181                break; 
     182        } 
    163183        }, 
    164184 
    165185        _showChild: function(page){