You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my current project it would be very useful to have a callback for when an image has just finished loading/preloading - don't care about video atm - (also, having it only called once per new slide would be great, but not a must!).
My usecase is to process single images before showing them, so a callback would do the trick. In particular I'm trying to change the cover mode based on images' size. I've tried to implement this myself, but probably I'm having timing issues (i.e. images are shown before the preprocess step finishes?!), or maybe I'm doing it wrong. (hooking into 'walk'/etc, f.e., isn't working).
Currently I'm setting the cover mode for the next slide and it works well, but handling correctly the first slide seems to be a problem.
Do you have any suggestions about how to solve this with the current implementation? (or maybe willing to implement the callback?)
Thanks for your work in any case! Impressive!
PS: Ohh... in my local repo I've made vegas('current') return a 'fromSlide' field too, as I needed it in my project to acknowledge where the successive slide is coming from (accounting for next/prev/jump). If you're interested I can make a PR with that. Let me know.
The text was updated successfully, but these errors were encountered:
Ok, I've hacked up the _goto function to satisfy my requirements and I'm posting my partial solution here in case someone else might find it helpful. (the whole thing comes after the realization that 'walk' is triggered after all settings like cover, transition, etc. are processed, and I needed to modify those before showing the next slide - yeah, in the aftermath it seems quite trivial, but it took me a couple of days to figure out why my previous approach wasn't working)
As I said it's rather hackish, and probably has drawbacks that I can't see right now (haven't tested it with video f.e., so not sure it works with that), but it does fulfill the job for my specific usecase ;).
azrafe7
changed the title
[feature request] onLoadCallack (esp. for images)
[feature request] 'beforeWalk' callback (esp. for images)
Nov 5, 2015
In my current project it would be very useful to have a callback for when an image has just finished loading/preloading - don't care about video atm - (also, having it only called once per new slide would be great, but not a must!).
My usecase is to process single images before showing them, so a callback would do the trick. In particular I'm trying to change the cover mode based on images' size. I've tried to implement this myself, but probably I'm having timing issues (i.e. images are shown before the preprocess step finishes?!), or maybe I'm doing it wrong. (hooking into 'walk'/etc, f.e., isn't working).
Currently I'm setting the cover mode for the next slide and it works well, but handling correctly the first slide seems to be a problem.
Do you have any suggestions about how to solve this with the current implementation? (or maybe willing to implement the callback?)
Thanks for your work in any case! Impressive!
PS: Ohh... in my local repo I've made
vegas('current')
return a 'fromSlide' field too, as I needed it in my project to acknowledge where the successive slide is coming from (accounting for next/prev/jump). If you're interested I can make a PR with that. Let me know.The text was updated successfully, but these errors were encountered: