@@ -23,7 +23,7 @@ import Ripple from '../components/ripple'
23
23
import Emoji from '../components/emoji'
24
24
25
25
import muiTheme from '../lib/muitheme'
26
- import { white , color , grey } from '../lib/styles'
26
+ import { white , color , grey , iPadMaxW } from '../lib/styles'
27
27
import withData from '../lib/withData'
28
28
29
29
// fixes "Warning: Unknown prop `onTouchTap` on <label> tag."
@@ -64,15 +64,31 @@ class Index extends Component {
64
64
const logos = ReactDOM . findDOMNode ( this . logos )
65
65
const comingSoon = ReactDOM . findDOMNode ( this . comingSoon )
66
66
67
+ const headerStart = ( window . screen . width > iPadMaxW
68
+ ? {
69
+ x : - header . offsetWidth , // '-100%' percentage not supported
70
+ }
71
+ : {
72
+ y : - header . offsetHeight ,
73
+ }
74
+ )
75
+
76
+ const headerDest = ( window . screen . width > iPadMaxW
77
+ ? {
78
+ x : 0 ,
79
+ }
80
+ : {
81
+ y : 0 ,
82
+ }
83
+ )
84
+
67
85
const animation = new TimelineLite ( { paused : true } )
68
86
69
87
// timeline.to(header, 2, { rotationX: 0, scale: 1.3 })
70
88
71
89
const path = 'M0,0 C0.46,0 0.804,0.243 0.87,0.368 0.928,0.478 0.884,0.4 1,1'
72
90
const ease = CustomEase . create ( 'steep-fall' , path )
73
- TweenLite . set ( header , {
74
- x : - header . offsetWidth , // '-100%' percentage not supported
75
- } )
91
+ TweenLite . set ( header , headerStart )
76
92
TweenLite . set ( introPara , {
77
93
x : - 50 ,
78
94
opacity : 0 ,
@@ -89,7 +105,7 @@ class Index extends Component {
89
105
animation
90
106
. delay ( 0.6 ) // wait for browser to not be busy. todo requestIdleCallback
91
107
. to ( header , 1 , {
92
- x : 0 ,
108
+ ... headerDest ,
93
109
ease : Power2 . easeIn ,
94
110
} )
95
111
. to ( introPara , 1.5 , {
@@ -136,7 +152,6 @@ class Index extends Component {
136
152
backgroundColor : color ,
137
153
color : white ,
138
154
willChange : 'transform' ,
139
- transform : 'translateX(-100%)' ,
140
155
} }
141
156
ref = { ( header ) => { this . header = header } }
142
157
>
0 commit comments