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