mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
30 lines
565 B
JavaScript
30 lines
565 B
JavaScript
|
|
import {Animation} from './animation';
|
|
|
|
|
|
class SlideIn extends Animation {
|
|
constructor(element) {
|
|
super(element);
|
|
this
|
|
.easing('cubic-bezier(0.1, 0.7, 0.1, 1)')
|
|
.duration(400)
|
|
.from('translateY', '100%')
|
|
.to('translateY', '0%');
|
|
}
|
|
}
|
|
|
|
Animation.register('slide-in', SlideIn);
|
|
|
|
class SlideOut extends Animation {
|
|
constructor(element) {
|
|
super(element);
|
|
this
|
|
.easing('easeInOut')
|
|
.duration(250)
|
|
.from('translateY', '0%')
|
|
.to('translateY', '100%');
|
|
}
|
|
}
|
|
|
|
Animation.register('slide-out', SlideOut);
|