44var layoutInfo = {
55 table : {
66 // ---- row position & size
7- top : function ( d , i ) { return 40 + i * 29 + 'px' } ,
7+ top : function ( d , i ) { return 40 + i * 31 + 'px' } ,
88 left : 0 ,
9- height : 28 ,
10- width : 590 ,
9+ height : 30 ,
10+ width : 594 ,
1111 // ---- row border-radius
1212 radius : 0 ,
1313 // ---- table header
@@ -23,12 +23,12 @@ var layoutInfo = {
2323 } ,
2424 cards : {
2525 // ---- card position & size
26- top : function ( d , i ) { return Math . floor ( i / cardsPerRow ) * 90 + 'px' } ,
27- left : function ( d , i ) { return ( i % cardsPerRow ) * 200 + 'px' } ,
28- height : 80 ,
29- width : 188 ,
26+ top : function ( d , i ) { return Math . floor ( i / cardsPerRow ) * 94 + 'px' } ,
27+ left : function ( d , i ) { return ( i % cardsPerRow ) * 210 + 'px' } ,
28+ height : 84 ,
29+ width : 200 ,
3030 // ---- card border-radius
31- radius : '5px ' ,
31+ radius : '4px ' ,
3232 // ---- table header (hidden)
3333 headerOpacity : 0 ,
3434 headerLeft : - 650 ,
@@ -37,21 +37,21 @@ var layoutInfo = {
3737 c1Left : 10 ,
3838 c1FontSize : 18 ,
3939 // ---- line 2
40- c2Top : 37 ,
40+ c2Top : 38 ,
4141 c2Left : 10 ,
4242 }
4343} ;
4444
4545var selector = '.holder' ;
4646var curStyle = 'cards' ; // "table" or "cards"
47- var animTime = 650 ;
47+ var animTime = 600 ;
4848
4949var holder ;
5050var cardsPerRow = 3 ;
5151
5252function getLayoutInfo ( style ) {
53- var width = window . innerWidth - 20 ;
54- cardsPerRow = Math . floor ( width / 200 ) ;
53+ var width = window . innerWidth - 40 ;
54+ cardsPerRow = Math . floor ( width / 210 ) ;
5555 return layoutInfo [ style ] ;
5656}
5757
@@ -127,8 +127,8 @@ function layout(skipAnim, skipChildren){
127127 . style ( 'left' , l . headerLeft ) ;
128128
129129 var totalHeight = 20 + ( curStyle === 'cards' ?
130- Math . ceil ( data . length / cardsPerRow ) * 90
131- : 40 + data . length * 29 ) ;
130+ Math . ceil ( data . length / cardsPerRow ) * 94
131+ : 40 + data . length * 31 ) ;
132132
133133 holder . transition ( t )
134134 . style ( 'height' , totalHeight ) ;
0 commit comments