pedroabreu / ion-gallery

Ionic gallery directive
MIT License
124 stars 61 forks source link

Subtitle disappeared after sliding of images #4

Closed ghchia closed 9 years ago

ghchia commented 9 years ago

The subtitle for the 1st image appeared when the image is clicked on the gallery. After sliding to the 3rd image and then back to the 1st image again, and the subtitle for 1st image disappeared.

pedroabreu commented 9 years ago

I'll have a look at it. Seems like a strange behaviour. Can you set up an example (ionic view app or something) ? I'll test this use case and I'll get back to you (Sorry for the time it takes to reply)

ghchia commented 9 years ago

I had 6 photos and there were repeated photos after the second round of swiping. After added/changed the lines below to the slideChanged function in ion-gallery.js, the issue was resolved. The subtitle was also resolved, as a result of this.

slidePosition = lastSlideIndex + '>' + currentSlideIndex;

// Added = to line if( currentImage >= galleryLength ){ currentImage = 0};

pedroabreu commented 9 years ago

Fixed on version v0.1.6