Giter VIP home page Giter VIP logo

Comments (5)

qwtel avatar qwtel commented on June 12, 2024

Difficult to explain. So originally I was using transform for positioning, but it caused some problems with existing transforms on the handles. That's probably the component you are seeing. After that I switched to absolute positioning, but still pixel based.
For the rewrite of the component I'm sticking with absolute positioning, despite the performance implications because

  • it allows to position the handles without knowing the size of the slider, which solves all the visibility related problems
  • the bars between the handles have to be positioned absolute anyway (I think in theory it would be possible to do it with scale(), but that won't do well with bars that have a background image)

from react-slider.

canfie1d avatar canfie1d commented on June 12, 2024

Oh ok, so the demo is using old code?
Why are you using px based values instead of percentage based?

from react-slider.

qwtel avatar qwtel commented on June 12, 2024

Yes. The reason is that percentage based positioning via transform is relative to the size of the element being transformed (i.e. setting transform: translateX(50%) on a handle will offset it by 50% of its width, which is not what we want)

from react-slider.

gabssnake avatar gabssnake commented on June 12, 2024

@qwtel any chances of unifying the two packages or updating this one to accept React 0.14 ?

from react-slider.

kodama78 avatar kodama78 commented on June 12, 2024

Hi, I noticed the same discrepancy and have a question. The code base is not positioning the handles correctly and for some reason seems to ignore the position: relative from the slider. My question is how do I fix this issue?

from react-slider.

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.