-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
updateModalImages() in show$ does not work #265
Comments
Are you saying that show$ is fired AFTER instead of BEFORE?
At the moment, this is not possible. |
not show$ itself, but it's subscription
that makes it impossible for me to "intercept" user during gallery navigation action, to serve him with different image (by updating images array under the hood) I would expect actual image render to happen after show$ subscription's event complete (if there is one present). |
Mmm ok now I understand. Yes it Is asynchronous. I'll try to do some experiments. |
I made some experiment but I don't know which workaround could work to implement this. To add this feature we need to modify the library to support pagination, but this is a huge change.
|
Is it easier to add to ks89GalleryService.updateModalImages(...) 2nd parameter like |
Yes, but it's a workaround, I cannot add this feature to a library used by many other people. This could cause other issues or misuses. However I still don't understand why you don't append images to the array instead of replace them. |
Well, I "flip" pages when user reaches the last on current page and clicks next, that's the logical way to do it. Trying to do guess with things like "reached 50% of the current page" gives a lot of different edge cases which also had to be dealt with somehow (like ModalGallery is triggerent with currentImage being last on current page - should I immediately fire next page fetch and re-populate it in that case, etc). |
When running updateModalImages() inside subscriptions of
show$()
(orfirstImage$
,lastImage$
) you still get an image from before updateModalImages() array shown, and only next navigation clicks get you to the refreshed images array.In manual it says that
show$
is fired BEFORE image visible so I expected to override current image with updateModalImages() ...Also, from this as a workaround comes a question if it is possible to programmatically change
currentImage
in already opened gallery? Did not find anything in docs.Thanks!
p.s.: your gallery looks and works great, thank you very much for making it available for everyone!
The text was updated successfully, but these errors were encountered: