Code Monkey home page Code Monkey logo

Comments (5)

uberstudio avatar uberstudio commented on June 12, 2024

I think you're referring to the half-step animation which takes place when dragging the handle, right?

This is just a quick dirty hack... but -
In rzslider.js, check out lines 238 and 246.
Look for the number "350" - You can zero it out to get rid of that half-step animation, so something like:

      }, 0, { leading: false });

Should do the trick...
Now your handle would just jump straight to the next station.
You might want to consider implementing smooth sliding animation by adding something like this to the CSS of your handle (the "pointer"):

rzslider span.pointer {
    -webkit-transition:all linear 0.15s;
    -moz-transition:all linear 0.15s;
    -o-transition:all linear 0.15s;
    transition:all linear 0.15s;
...
}

Hope this helps.

from angularjs-slider.

escopecz avatar escopecz commented on June 12, 2024

Works great. Thanks a lot.

One more question: I would need a ruler above the slider. Now there is visible the first and the last number. Is it possible to set for example rz-slider-ruler-step="6" and then there will be 2 ruler points at the start and end and 4 points in the middle as well?

I'll try to draw it down:

    0    2    4    6    8   10
    |____|____|____|____|____|

Step is still 1, so you can select number 3 for example.

As an author of this project, can you recommend the best and easiest way how to implement it?

from angularjs-slider.

uberstudio avatar uberstudio commented on June 12, 2024

I am not the author, just a user... Hopefully will become a contributor - I implemented some new features like LTR and vertical slider support, which I will send a pull request for after stabilizing.

Good luck implementing the ruler!

from angularjs-slider.

escopecz avatar escopecz commented on June 12, 2024

Thanks anyway! I'll try :)

from angularjs-slider.

jlouthan avatar jlouthan commented on June 12, 2024

@uberstudio I came here with the same half-step issue. Thanks for posting the quick fix!

from angularjs-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.