@@ -2,13 +2,12 @@ import { AnimationBuilder } from '@angular/animations';
2
2
import { CommonModule } from '@angular/common' ;
3
3
import {
4
4
AfterViewInit , Component , HostBinding , OnDestroy , OnInit ,
5
- Input , Output , EventEmitter , ContentChildren , QueryList , ElementRef , NgModule , ChangeDetectorRef
5
+ Input , Output , EventEmitter , ContentChildren , QueryList , ElementRef , NgModule
6
6
} from '@angular/core' ;
7
7
import { IgxCarouselComponentBase } from 'igniteui-angular' ;
8
8
import { Subject } from 'rxjs' ;
9
9
import { takeUntil } from 'rxjs/operators' ;
10
10
import { growVerIn , growVerOut } from '../animations/grow' ;
11
- import { slideInLeft , slideOutRight } from '../animations/slide' ;
12
11
import { ToggleAnimationSettings } from '../expansion-panel/toggle-animation-component' ;
13
12
import { IgxStepperOrienatation , IGX_STEPPER_COMPONENT , IStepToggledEventArgs , IStepTogglingEventArgs } from './common' ;
14
13
import {
@@ -40,11 +39,11 @@ export class IgxStepperComponent extends IgxCarouselComponentBase implements OnI
40
39
return this . orientation === IgxStepperOrienatation . Horizontal ;
41
40
}
42
41
43
- /** Get/Set the animation settings that branches should use when expanding/collpasing .
42
+ /** Get/Set the animation settings that should be used when the active step is changed in vertical orientation mode .
44
43
*
45
44
* ```html
46
- * <igx-tree [animationSettings ]="customAnimationSettings">
47
- * </igx-tree >
45
+ * <igx-stepper [verticalAnimationSettings ]="customAnimationSettings">
46
+ * </igx-stepper >
48
47
* ```
49
48
*
50
49
* ```typescript
@@ -53,15 +52,45 @@ export class IgxStepperComponent extends IgxCarouselComponentBase implements OnI
53
52
* closeAnimation: growVerOut
54
53
* };
55
54
*
56
- * this.tree.animationSettings = animationSettings;
55
+ * this.stepper.verticalAnimationSettings = animationSettings;
57
56
* ```
58
57
*/
59
58
@Input ( )
60
- public animationSettings : ToggleAnimationSettings = {
59
+ public verticalAnimationSettings : ToggleAnimationSettings = {
61
60
openAnimation : growVerIn ,
62
- closeAnimation : growVerOut
61
+ closeAnimation : growVerOut ,
63
62
} ;
64
63
64
+ /**
65
+ * Gets/sets the animation type of the stepper when the orientation direction is horizontal.
66
+ * Default value is `slide`. Another possible values are `none` and `fade`.
67
+ * ```html
68
+ * <igx-stepper animationType='none'>
69
+ * <igx-stepper>
70
+ * ```
71
+ *
72
+ * @memberOf IgxSlideComponent
73
+ */
74
+ @Input ( )
75
+ public get horizontalAnimationType ( ) : string {
76
+ return this . animationType ;
77
+ }
78
+
79
+ public set horizontalAnimationType ( value : string ) {
80
+ // TODO: activeChange event is not emitted for the collapsing steps
81
+ this . stepperService . collapsingSteps . clear ( ) ;
82
+ this . animationType = value ;
83
+ }
84
+
85
+ @Input ( )
86
+ public get horizontalAnimationDuration ( ) : number {
87
+ return this . animationDuration ;
88
+ }
89
+
90
+ public set horizontalAnimationDuration ( value : number ) {
91
+ this . animationDuration = value ;
92
+ }
93
+
65
94
/**
66
95
* Get/Set whether the stepper is linear.
67
96
* Only if the active step is valid the user is able to move forward.
@@ -89,17 +118,7 @@ export class IgxStepperComponent extends IgxCarouselComponentBase implements OnI
89
118
if ( this . _orientation === value ) {
90
119
return ;
91
120
}
92
- if ( value === IgxStepperOrienatation . Horizontal ) {
93
- this . animationSettings = {
94
- openAnimation : slideInLeft ,
95
- closeAnimation : slideOutRight
96
- } ;
97
- } else {
98
- this . animationSettings = {
99
- openAnimation : growVerIn ,
100
- closeAnimation : growVerOut
101
- } ;
102
- }
121
+
103
122
// TODO: activeChange event is not emitted for the collapsing steps
104
123
this . stepperService . collapsingSteps . clear ( ) ;
105
124
this . _orientation = value ;
0 commit comments