Hi David, thanks for the great plugin you have created.
It seems when using imagesloaded: true, the cellSelect event is fired once for every image in the gallery when the plugin loads. Here is a Codepen demo showing the problem in action (you will need to view the console).
Digging around in the code I found these lines so I enabled freeScroll and sure enough the issue goes away.
I would have submit a PR but I'm not sure whether this is a bug or intended behaviour. It seems counterintuitive to be firing before the plugin is loaded. Unfortunately I can't enable freeScroll and use cellSelect to fire off a number of different actions so for my use case this is a huge problem. My workaround in the meantime is to use the settle event instead, but cellSelect would be preferred for both semantic reasons and because it fires immediately whereas settle is delayed by animation.
Hi David, thanks for the great plugin you have created.
It seems when using
imagesloaded: true
, thecellSelect
event is fired once for every image in the gallery when the plugin loads. Here is a Codepen demo showing the problem in action (you will need to view the console).Digging around in the code I found these lines so I enabled
freeScroll
and sure enough the issue goes away.I would have submit a PR but I'm not sure whether this is a bug or intended behaviour. It seems counterintuitive to be firing before the plugin is loaded. Unfortunately I can't enable
freeScroll
and usecellSelect
to fire off a number of different actions so for my use case this is a huge problem. My workaround in the meantime is to use thesettle
event instead, butcellSelect
would be preferred for both semantic reasons and because it fires immediately whereassettle
is delayed by animation.Thanks for your time.