GalleryView icon indicating copy to clipboard operation
GalleryView copied to clipboard

Single Image bug

Open S-ed opened this issue 13 years ago • 1 comments

Greetings. There some bug with navigation/display appears when only one image loaded. (Image disappears/becomes semitransparent etc)

  • It'll be great if script will count images and hide navigation if only one image in gallery.

S-ed avatar Dec 13 '12 13:12 S-ed

This one is a pretty easy fix -- I just modified the showNext and showPrev methods to do nothing if there is only one image:


        showNext: function() {
+           // Next/Previous don't need to do anything if there is only one image
+           if (this.numImages == 1) {
+               return;
+           }
            this.navAction = 'next';
            this.showItem(this.frameIterator+1);
        },

        showPrev: function() {
+           // Next/Previous don't need to do anything if there is only one image
+           if (this.numImages == 1) {
+               return;
+           }
            this.navAction = 'prev';
            this.showItem(this.frameIterator-1);

jbauer23 avatar Feb 26 '13 21:02 jbauer23