Giter Club home page Giter Club logo

Comments (5)

peduarte avatar peduarte commented on May 24, 2024

Hmmm I'm not sure I fully understand this one 😁

wallop just adds classes that it needs. If you need a first or last class in your items, feel free to add them.

wallop is very flexible and by listening to the change event, you can get access to the currentItemIndex property and again, to loads of stuff.

I wouldnt want to bloat wallop with too many more classes as I was to provide just the basics and give developers the freedom to extend it.

But maybe I misunderstood your question...

from wallop.

MissFerrety avatar MissFerrety commented on May 24, 2024

What I mean is that by automatically assigning the first slide of the bunch with the opposite class than the rest of the slider is moving in, you trigger the a movement that may not be what is expected, especially since carousel is on by default.

With --slide for example, as the slider progresses through each item, things come in from the right. However, once the first slide is reached again, the hide/show classes switch from hidePrevious & showNext to hideNext' & 'showPrevious. This causes a (rather jarring) change from the right-left behavior to left-right instead.

I think -- and I may be wrong her, plus it is also ultimately your decision -- that the expectation for a carousel slider is to consistently move in the same direction, and so this opposite-classing behavior may not be ideal.

from wallop.

peduarte avatar peduarte commented on May 24, 2024

Ah...
Yes.

I know exactly what you mean.

I am actually working on this, and I also noticed it while testing the slide animation.
Basically, what I am doing is introducing a direction variable – where it stores whether the user is navigating forwards or backwards.

This will ensure the right classes are added based on the direction of the navigation.

Thanks for raising this and well spotted πŸ‘

from wallop.

MissFerrety avatar MissFerrety commented on May 24, 2024

Thanks for being on top of things! I'll look forward to a new release, as the fade animation is clouding my content (#40) and slide is my next best option. I've just overwritten my JS to only use a single set of classes since I don't have the time or budget to spend reworking anything now and hope the client doesn't ask for forward/backward navigation!

from wallop.

peduarte avatar peduarte commented on May 24, 2024

@MissFerrety Just to let you know I fixed the fade animation. Will close this and create a new issue with the 'direction' task.

from wallop.

Related Issues (20)

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.