File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
public/src/app/components/landing/skills Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ export class SkillsComponent implements OnInit {
59
59
60
60
ngAfterViewInit ( ) {
61
61
this . initSwiper ( ) ;
62
+ this . mySwiper . destroy ( ) ;
63
+ setTimeout ( ( ) => { this . initSwiper ( ) ; } , 20 ) ;
62
64
}
63
65
previousSlide ( ) {
64
66
this . mySwiper . slidePrev ( ) ;
@@ -76,12 +78,13 @@ export class SkillsComponent implements OnInit {
76
78
if ( this . mySwiper ) this . mySwiper . update ( ) ;
77
79
}
78
80
initSwiper ( ) {
79
- this . mySwiper = new Swiper ( '.skills__body' , {
80
- paginationClickable : false ,
81
- grabCursor : true ,
82
- loop : true ,
83
- slidesPerView : this . slidesPerView
84
- } ) ;
81
+ this . mySwiper = new Swiper ( '.skills__body' , {
82
+ autoplay : 3000 ,
83
+ paginationClickable : false ,
84
+ grabCursor : true ,
85
+ loop : true ,
86
+ slidesPerView : this . slidesPerView
87
+ } ) ;
85
88
}
86
89
ngOnInit ( ) {
87
90
this . handleSlidesAmount ( ) ;
@@ -91,7 +94,7 @@ export class SkillsComponent implements OnInit {
91
94
if ( res ) {
92
95
console . log ( 'destroy swiper' ) ;
93
96
this . mySwiper . destroy ( ) ;
94
- setTimeout ( ( ) => { this . initSwiper ( ) } , 20 ) ;
97
+ setTimeout ( ( ) => { this . initSwiper ( ) ; } , 20 ) ;
95
98
this . storeService . setLangChanged ( false ) ;
96
99
}
97
100
}
You can’t perform that action at this time.
0 commit comments