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
I have been opening an image automatically (doing my own "open from URL" implementation) - as per the example, but with my own options (such as an onChange listener, no captions, and fade in animation):
However, the gallery doesn't move forward until I move back (this may not be related to user options), there are captions, the animation is the default, and nothing happens onChange.
Having a look at source, plus debugging in Chrome dev tools, I think show(index, gallery) intends to prepareOverlay(gallery, options), but the top-level options is still unset.
The only place options is set is in prepareOverlay(gallery, userOptions) itself and run() only sets that function to be called inside the click handler - ie when you press a preview. Thus, running the gallery and then showing an image programmatically does not utilise the user options.
I guess a fix might be to pass the user options for a second time, into show(), but perhaps there's a cleaner way of storing the options during run() for use both in manual (click) and programmatic (show()) use cases?
The text was updated successfully, but these errors were encountered:
I have been opening an image automatically (doing my own "open from URL" implementation) - as per the example, but with my own options (such as an onChange listener, no captions, and fade in animation):
However, the gallery doesn't move forward until I move back (this may not be related to user options), there are captions, the animation is the default, and nothing happens onChange.
Having a look at source, plus debugging in Chrome dev tools, I think
show(index, gallery)
intends toprepareOverlay(gallery, options)
, but the top-leveloptions
is still unset.The only place
options
is set is inprepareOverlay(gallery, userOptions)
itself andrun()
only sets that function to be called inside the click handler - ie when you press a preview. Thus, running the gallery and then showing an image programmatically does not utilise the user options.I guess a fix might be to pass the user options for a second time, into
show()
, but perhaps there's a cleaner way of storing the options duringrun()
for use both in manual (click) and programmatic (show()
) use cases?The text was updated successfully, but these errors were encountered: