Prevent lightbox transition until specific number of scroll events (#2544)

* Delay before nav to next image on scroll
* Add config for scroll attempts before transition
This commit is contained in:
WithoutPants
2022-05-06 12:22:26 +10:00
committed by GitHub
parent c1a096a1a6
commit 73ded0d97d
9 changed files with 90 additions and 23 deletions

View File

@@ -342,6 +342,10 @@ func (r *mutationResolver) ConfigureInterface(ctx context.Context, input models.
setBool(config.ImageLightboxScaleUp, options.ScaleUp)
setBool(config.ImageLightboxResetZoomOnNav, options.ResetZoomOnNav)
setString(config.ImageLightboxScrollMode, (*string)(options.ScrollMode))
if options.ScrollAttemptsBeforeChange != nil {
c.Set(config.ImageLightboxScrollAttemptsBeforeChange, *options.ScrollAttemptsBeforeChange)
}
}
if input.CSS != nil {