@@ -20,7 +20,8 @@ import {
20
20
state ,
21
21
style ,
22
22
animate ,
23
- transition
23
+ transition ,
24
+ keyframes ,
24
25
} from '@angular/animations' ;
25
26
import { CdkColumnDef } from '@angular/cdk/table' ;
26
27
import { Subscription } from 'rxjs/Subscription' ;
@@ -70,6 +71,24 @@ const SORT_ANIMATION_TRANSITION =
70
71
state ( 'asc' , style ( { transform : 'rotate(45deg)' } ) ) ,
71
72
state ( 'desc' , style ( { transform : 'rotate(-45deg)' } ) ) ,
72
73
transition ( 'asc <=> desc' , animate ( SORT_ANIMATION_TRANSITION ) )
74
+ ] ) ,
75
+ trigger ( 'indicatorToggle' , [
76
+ transition ( 'void => asc' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
77
+ style ( { transform : 'translateY(25%)' , opacity : 0 } ) ,
78
+ style ( { transform : 'none' , opacity : 1 } )
79
+ ] ) ) ) ,
80
+ transition ( 'asc => void' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
81
+ style ( { transform : 'none' , opacity : 1 } ) ,
82
+ style ( { transform : 'translateY(-25%)' , opacity : 0 } )
83
+ ] ) ) ) ,
84
+ transition ( 'void => desc' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
85
+ style ( { transform : 'translateY(-25%)' , opacity : 0 } ) ,
86
+ style ( { transform : 'none' , opacity : 1 } )
87
+ ] ) ) ) ,
88
+ transition ( 'desc => void' , animate ( SORT_ANIMATION_TRANSITION , keyframes ( [
89
+ style ( { transform : 'none' , opacity : 1 } ) ,
90
+ style ( { transform : 'translateY(25%)' , opacity : 0 } )
91
+ ] ) ) ) ,
73
92
] )
74
93
]
75
94
} )
0 commit comments