Giter Site home page Giter Site logo

flickity-transformer's People

Contributors

elcontraption avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flickity-transformer's Issues

Usage for multiple flickity instances

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]
      ]
    }
  ])
})

Error when try to insert new cell.

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)

Flickity 3.0 Support?

The transform is not compatible with Flickity 3.0 and the examples are currently broken.

Support wrapAround: true

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.