Comments (5)
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.
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.
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.
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.
@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)
- Collaboration HOT 1
- Autostart reset timer HOT 1
- Expose method for updating global variables HOT 4
- How to import it in an angular 2 project? HOT 3
- How about multiple columns? HOT 5
- New modifiers: show & hide HOT 2
- New example: Wallop with Custom Markup HOT 1
- Uncaught (in promise) Error HOT 14
- Wallop is not a constructor HOT 1
- Include main in bower.json too HOT 2
- Wrong behaviour for slider with two slides
- slider autoplay HOT 1
- Which browsers are supported? HOT 1
- Can't resolve 'Wallopβ when building on linux HOT 4
- Problem with absolute positioned items, flexbox and Firefox HOT 3
- equal height slides HOT 4
- All images broken on CodePen examples collection
- .mp4 videos in slide don't work in Chrome HOT 1
- Slide effect in Safari not nice
- Consuta Blancos entre distintas imagenes;
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wallop.