File tree Expand file tree Collapse file tree
public/src/app/components/landing/skills Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ export class SkillsComponent implements OnInit {
5959
6060 ngAfterViewInit ( ) {
6161 this . initSwiper ( ) ;
62+ this . mySwiper . destroy ( ) ;
63+ setTimeout ( ( ) => { this . initSwiper ( ) ; } , 20 ) ;
6264 }
6365 previousSlide ( ) {
6466 this . mySwiper . slidePrev ( ) ;
@@ -76,12 +78,13 @@ export class SkillsComponent implements OnInit {
7678 if ( this . mySwiper ) this . mySwiper . update ( ) ;
7779 }
7880 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+ } ) ;
8588 }
8689 ngOnInit ( ) {
8790 this . handleSlidesAmount ( ) ;
@@ -91,7 +94,7 @@ export class SkillsComponent implements OnInit {
9194 if ( res ) {
9295 console . log ( 'destroy swiper' ) ;
9396 this . mySwiper . destroy ( ) ;
94- setTimeout ( ( ) => { this . initSwiper ( ) } , 20 ) ;
97+ setTimeout ( ( ) => { this . initSwiper ( ) ; } , 20 ) ;
9598 this . storeService . setLangChanged ( false ) ;
9699 }
97100 }
You can’t perform that action at this time.
0 commit comments