update paper dialog animation

This commit is contained in:
Luke Pulverenti 2015-12-08 15:05:08 -05:00
parent 9a99eaa803
commit 35a8a1611a

View file

@ -102,14 +102,14 @@
dlg.setAttribute('noAutoFocus', 'noAutoFocus'); dlg.setAttribute('noAutoFocus', 'noAutoFocus');
// These don't seem to perform well on mobile // These don't seem to perform well on mobile
if (!browserInfo.mobile) { var defaultEntryAnimation = browserInfo.mobile ? 'fade-in-animation' : 'scale-up-animation';
dlg.entryAnimation = options.entryAnimation || 'scale-up-animation'; dlg.entryAnimation = options.entryAnimation || defaultEntryAnimation;
dlg.exitAnimation = 'fade-out-animation'; dlg.exitAnimation = 'fade-out-animation';
dlg.animationConfig = { dlg.animationConfig = {
// scale up // scale up
'entry': { 'entry': {
name: options.entryAnimation || 'scale-up-animation', name: options.entryAnimation || defaultEntryAnimation,
node: dlg, node: dlg,
timing: { duration: options.entryAnimationDuration || 300, easing: 'ease-out' } timing: { duration: options.entryAnimationDuration || 300, easing: 'ease-out' }
}, },
@ -120,7 +120,6 @@
timing: { duration: options.exitAnimationDuration || 400, easing: 'ease-in' } timing: { duration: options.exitAnimationDuration || 400, easing: 'ease-in' }
} }
}; };
}
dlg.classList.add('popupEditor'); dlg.classList.add('popupEditor');