Coder Social home page Coder Social logo

nested swiper about swipe HOT 5 CLOSED

thebird avatar thebird commented on July 20, 2024
nested swiper

from swipe.

Comments (5)

alexblack avatar alexblack commented on July 20, 2024

I'm not sure if this is related, but I'm interested in having a slider (e.g. for the user to choose a price) in a swipe div. I'm trying out using this one: http://code.ovidiu.ch/dragdealer/

It actually works, but both the slider and the swipe move when I touch-drag :)

I'm wondering if you have any suggestions what approach I need to take here. I think the slider needs to receive the events and prevent the swipe from receiving them?

from swipe.

DaFrik avatar DaFrik commented on July 20, 2024

@alexblack , i believe you have to dig into the dragdealer's code and add the stopPropagation() function to appropriate event to prevent the touch event reach the swipejs when you are indeed dragging the slider.

from swipe.

alexblack avatar alexblack commented on July 20, 2024

Thanks DaFrik, thats what I was thinking too.. but I wasn't sure which component would be receiving the events first, Swipe.js or DragDealer..?

At first glance it looks like DragDealer already calls stopPropagation, I'll have to look at it more closely.

from swipe.

benschwarz avatar benschwarz commented on July 20, 2024

@bradbirdsall this is a pretty good suggestion to add a couple of stopPropagations… I can't think of any side effect.
What do you think about making this change (in both branches?)

from swipe.

thebird avatar thebird commented on July 20, 2024

Sounds like a pretty good idea. Can anyone think of any side effects?

If not throw up some pull requests :)

from swipe.

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.