File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -553,26 +553,24 @@ function loadProjectRequirements(data) {
553
553
let nextArrow = document . querySelector ( '[data-next-image]' )
554
554
555
555
controls . addEventListener ( 'click' , e => {
556
-
556
+ console . log ( currentIndex ) ;
557
557
if ( e . target === prevArrow ) {
558
558
559
- if ( currentIndex === 0 ) {
559
+ if ( currentIndex == 0 ) {
560
560
currentIndex = projectFileData . currentMocks . length - 1 ;
561
561
} else {
562
562
currentIndex -= 1 ;
563
563
}
564
-
565
564
}
566
565
567
566
if ( e . target === nextArrow ) {
568
- if ( currentIndex === projectFileData . currentMocks . length - 1 ) {
567
+ if ( currentIndex == projectFileData . currentMocks . length - 1 ) {
569
568
currentIndex = 0 ;
570
569
} else {
571
570
currentIndex ++ ;
572
571
}
573
572
}
574
-
575
- console . log ( projectFileData . currentMocks . length ) ;
573
+ ;
576
574
577
575
gallery . innerHTML = '' ;
578
576
let currentMock = projectFileData . currentMocks [ currentIndex ] ;
Original file line number Diff line number Diff line change @@ -553,26 +553,24 @@ function loadProjectRequirements(data) {
553
553
let nextArrow = document . querySelector ( '[data-next-image]' )
554
554
555
555
controls . addEventListener ( 'click' , e => {
556
-
556
+ console . log ( currentIndex ) ;
557
557
if ( e . target === prevArrow ) {
558
558
559
- if ( currentIndex === 0 ) {
559
+ if ( currentIndex == 0 ) {
560
560
currentIndex = projectFileData . currentMocks . length - 1 ;
561
561
} else {
562
562
currentIndex -= 1 ;
563
563
}
564
-
565
564
}
566
565
567
566
if ( e . target === nextArrow ) {
568
- if ( currentIndex === projectFileData . currentMocks . length - 1 ) {
567
+ if ( currentIndex == projectFileData . currentMocks . length - 1 ) {
569
568
currentIndex = 0 ;
570
569
} else {
571
570
currentIndex ++ ;
572
571
}
573
572
}
574
-
575
- console . log ( projectFileData . currentMocks . length ) ;
573
+ ;
576
574
577
575
gallery . innerHTML = '' ;
578
576
let currentMock = projectFileData . currentMocks [ currentIndex ] ;
You can’t perform that action at this time.
0 commit comments