forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransition.ts
More file actions
48 lines (38 loc) · 1.08 KB
/
transition.ts
File metadata and controls
48 lines (38 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { Animation, AnimationOptions } from '../animations/animation';
import { ViewController } from '../navigation/view-controller';
/**
* @private
*
* - play
* - Add before classes - DOM WRITE
* - Remove before classes - DOM WRITE
* - Add before inline styles - DOM WRITE
* - set inline FROM styles - DOM WRITE
* - RAF
* - read toolbar dimensions - DOM READ
* - write content top/bottom padding - DOM WRITE
* - set css transition duration/easing - DOM WRITE
* - RAF
* - set inline TO styles - DOM WRITE
*/
export class Transition extends Animation {
_trnsStart: Function;
parent: Transition;
hasChildTrns: boolean;
trnsId: number;
constructor(public enteringView: ViewController, public leavingView: ViewController, opts: AnimationOptions, raf?: Function) {
super(null, opts, raf);
}
init() {}
registerStart(trnsStart: Function) {
this._trnsStart = trnsStart;
}
start() {
this._trnsStart && this._trnsStart();
this._trnsStart = null;
}
destroy() {
super.destroy();
this.enteringView = this.leavingView = this._trnsStart = null;
}
}