Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ПЪРВА ЧАСТ
- /* Animate flying tickets */
- if (initialize.device[0] === 'iPhone') {
- // jQuery .position() doesn't work on IOS devices. This is a hardcore solution which works for now.
- leftEnd = $('#game').width() / 12.35;
- } else if (navigator.userAgent.indexOf('Mac OS X') != -1) {
- // jQuery .position() doesn't work on Mac OS devices. This is a hardcore solution which works for now.
- leftEnd = $('#game').width() / 18;
- console.log('MAC OS - LEFT END = ' + leftEnd);
- }
- // ВТОРА ЧАСТ
- function topEndByDevice(animationWrapper) {
- let topEnd;
- if (initialize.device[0] === 'iPhone' || initialize.device[0] === 'ipad' || navigator.userAgent.indexOf('Mac OS X') != -1) {
- // jQuery .position() doesn't work on IOS and MAC OS devices. This is a hardcore solution which works for now.
- topEnd = $('#game').height() / 4.43;
- console.log('MAC OS - TOP END = ' + topEnd);
- } else if (initialize.device[0] === 'android') {
- topEnd = animationWrapper.position().top + 30;
- } else {
- topEnd = animationWrapper.position().top + 100;
- }
- return topEnd;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement