Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endless loading with one image in gallery #52

Closed
janosfarkas opened this issue Jan 10, 2018 · 11 comments
Closed

endless loading with one image in gallery #52

janosfarkas opened this issue Jan 10, 2018 · 11 comments

Comments

@janosfarkas
Copy link

- [x] bug report 
- [ ] feature request
- [ ] question

OS and Version?

All (Windows 10, Windows 8.1, iOS 11.2.2, Android 8.0, Android 6.0.1 tested)

Versions

Angular CLI: 1.6.3
Node: 8.9.0
Angular: 5.1.3

Repro steps

If there is only 1 image in gallery and you swipe to the left or right control arrows disappear and starts endless loading.

@MurhafSousli
Copy link
Owner

The arrows disappear on loading, but the photos are just too large!

@jgarciao
Copy link

I think I have the same problem when loading ng-gallery (1.0.1) with just one image:

Also I think when having only one image the left-right arrows could be hidden

Thank you for your awesome component!

Downstream bug: https://github.com/jgarciao/linux-store-frontend/issues/35

@MurhafSousli
Copy link
Owner

MurhafSousli commented Jan 14, 2018

@janosfarkas can you reproduce the issue in https://stackblitz.com/edit/ng-gallery
What is the gallery state in you app look like?
Add this to print it out

this.galley.state$.subscribe(res => console.log(res))

@janosfarkas
Copy link
Author

in app.component.html just remove 3 out of 4 images, click on the remaining one, and then push left/right arrow.
gallery state looks like this:
Object { action: "next", currIndex: 0, hasNext: false, hasPrev: false, play: false, loading: true, items: Array[1] }

@MurhafSousli
Copy link
Owner

@janosfarkas fork the stackblitz, make the change and give me the new link so I can see it

@janosfarkas
Copy link
Author

@MurhafSousli
Copy link
Owner

@janosfarkas it is working! I don't see any issue

@janosfarkas
Copy link
Author

@MurhafSousli https://youtu.be/pTCjyKhLP2c so this is how it should work?

@jgarciao
Copy link

Same issue as https://beta.flathub.org/apps/details/org.gnome.gedit

Clicking on the image when there is only one should do nothing or load it again

@jgarciao
Copy link

@janosfarkas I've made a workaround here jgarciao/linux-store-frontend@ffc8ad9

if(this.app.screenshots.length == 1){
        this.galleryConfig.loader = null;
        this.galleryConfig.navigation = null;
        this.galleryConfig.thumbnails = null;
      }

@maku
Copy link

maku commented Feb 12, 2018

@MurhafSousli i stumbled over this error -> when only 1 picture is available there should no navigation capabilities
(currently behaviour when you click on the next button the loading symbol occurs on a blank screen and nothing happens)
How can I handle this? (the workaround to change the gallery config dynamically is a little ugly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants