elcontraption / flickity-transformer Goto Github PK
View Code? Open in Web Editor NEWTransform your Flickity.
License: GNU General Public License v3.0
Transform your Flickity.
License: GNU General Public License v3.0
Relevant line of code:
// Get proximity to carousel home
xPos = slide.parent.x < 0 ? slide.target - Math.abs(slide.parent.x) : slide.target + slide.parent.x
Hey!
Is it possible to initialise flickity-transformer for multiple flickity elements on the same page? Using the code below, only the last instance found has the transformer properly applied.
var coverflowEl = document.querySelectorAll("[data-coverflow]");
coverflowEl.forEach(function(instance, index) {
var flkty = new Flickity(instance, {
prevNextButtons: false,
pageDots: false
});
var flktyTransform = new FlickityTransformer(flkty, [
{
name: 'scale',
stops: [
[-100, 0.5],
[0, 1],
[100, 0.5]
]
}
])
})
flickity.pkgd.js version: 2.2.1
flickity-transformer.pkgd.js version:0.3.6
When I try to insert new cell by flickity api, I got this error and everything not work any more.
Uncaught TypeError: Cannot read property 'style' of undefined
at FlickityTransformer.applyTransforms (flickity-transformer.pkgd.js:342)
at Array.forEach (<anonymous>)
at Flickity.<anonymous> (flickity-transformer.pkgd.js:280)
at Flickity.proto.emitEvent (flickity.pkgd.js?v=0.01:254)
at Flickity.proto.dispatchEvent (flickity.pkgd.js?v=0.01:1637)
at Flickity.proto.dispatchScrollEvent (flickity.pkgd.js?v=0.01:1044)
at Flickity.proto.positionSlider (flickity.pkgd.js?v=0.01:1023)
at Flickity.proto.animate (flickity.pkgd.js?v=0.01:1002)
at Flickity.proto.startAnimation (flickity.pkgd.js?v=0.01:992)
at Flickity.proto.select (flickity.pkgd.js?v=0.01:1680)
I modified the basic example in CodePen, but with the slides having no horizontal margin and I applied translateZ in the hopes zIndex would interpolate on drag. But I can't get it to work. Have you tried to do something like this?
The transform is not compatible with Flickity 3.0 and the examples are currently broken.
Currently you're stuck with the defaults that are set here.
We're currently limited to what is set here.
Must support clamp
and a piecewise (multi-stop) scale.
d3-scale
should not be included in the commonjs module.
Current tests leave much to be desired.
This is closely tied to issue #7.
Relevant line of code:
// Get proximity to carousel home
xPos = slide.parent.x < 0 ? slide.target - Math.abs(slide.parent.x) : slide.target + slide.parent.x
Hi Darin
Could Flickity Transformer work as a 360-product slider? Trying to accomplish something like this: https://polarnotion.github.io/turntable (needs jquery)
Would love to accomplish it with Flickity if its possible. Any pointers on how to make that?
Thanks!
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.