File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -49,34 +49,26 @@ export default class IgcCarouselSlideComponent extends LitElement {
4949 }
5050 ) ;
5151
52- private get _carouselInstance ( ) : IgcCarouselComponent | undefined {
53- return this . _carousel ?? this . _context . value ;
54- }
55-
5652 protected get _index ( ) : number {
57- return this . _carouselInstance
58- ? this . _carouselInstance . slides . indexOf ( this )
59- : 0 ;
53+ return this . _carousel ? this . _carousel . slides . indexOf ( this ) : 0 ;
6054 }
6155
6256 protected get _total ( ) : number {
63- return this . _carouselInstance ? this . _carouselInstance . slides . length : 0 ;
57+ return this . _carousel ? this . _carousel . slides . length : 0 ;
6458 }
6559
6660 protected get _animation ( ) {
67- const animation = this . _carouselInstance ?. animationType ?? 'slide' ;
61+ const animation = this . _carousel ?. animationType ?? 'slide' ;
6862
6963 if ( animation === 'slide' ) {
70- return this . _carouselInstance ?. vertical ? 'slideVer' : 'slideHor' ;
64+ return this . _carousel ?. vertical ? 'slideVer' : 'slideHor' ;
7165 }
7266
7367 return animation ;
7468 }
7569
7670 protected get _labelFormat ( ) : string {
77- return this . _carouselInstance
78- ? this . _carouselInstance . slidesLabelFormat
79- : '' ;
71+ return this . _carousel ? this . _carousel . slidesLabelFormat : '' ;
8072 }
8173
8274 /**
You can’t perform that action at this time.
0 commit comments