metafizzy / flickity-imagesloaded Goto Github PK
View Code? Open in Web Editor NEWenables imagesLoaded option for Flickity
enables imagesLoaded option for Flickity
Excuse me for this issue, but I really need this update
I have a carousel with 5 slides. When I focus the carousel (click on a dot to move to for ex. slide #2), and hit tab, the carousel scrolls to the last slide (#5). I am using flickity-imagesloaded and initializing it like so:
{
accessibility: true,
draggable: '>1',
friction: 0.4,
prevNextButtons: true,
imagesLoaded: true
}) ```
Everything else appears to working correctly. Any idea what might cause this bug?
My suspicion is that this behavior is caused by a button that is on the last flickity slide.
Hi,
Does imagesloaded wait for html 'img' tag images, or css 'background-image' images, or both?
I npm installed flickity and am including it into my project via es6 syntac in the following way:
import Flickity from 'flickity';
and calling it with following options
this.flkty = new Flickity(this.refs.carousel, {
cellAlign: 'left',
wrapAround: false,
pageDots: false,
prevNextButtons: false,
draggable: true,
freeScroll: false,
autoPlay: false,
imagesLoaded: true
});
but imagesLoaded doesn't seem to work in my case, as container still cuts them off.
@desandro Hey David,
it seems like this package is still loading an old version of Imagesloaded (v4) which is not working correctly with srcset. Is there any way to update this to the latest version? When I install imagesloaded separately it still uses this old version within Flickity.
Thank you so much in advance,
Manuel
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.
Thanks for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.