LeaVerou / multirange

A tiny polyfill for HTML5 multi-handle sliders
http://projects.verou.me/multirange/
MIT License
607 stars 82 forks source link

Draggable track. #44

Closed sercxjo closed 4 years ago

sercxjo commented 4 years ago

A new feature is enabled by specifying the attribute data-drag-middle. Dragging the middle allows to simultaneously change the High and Low values, fixing the difference between them.

7

Tested on Firefox and Chrome

sercxjo commented 4 years ago

Tested on Safari. This and the previous PR both OK.

LeaVerou commented 4 years ago

Hi there,

Thanks for contributing! Is drag a custom attribute that you specified? Can't find anything about it. If so, it should have a data- prefix.

sercxjo commented 4 years ago

Well, let it be data-behaviour="drag" what is more similar to noUiSlider https://refreshless.com/nouislider/behaviour-option/

LeaVerou commented 4 years ago

I would suggest using a different word, that doesn't have different spelling in US English vs British/Canadian/Australian English (behavior vs behaviour). Also, if it has no other value, it should probably be a boolean attribute (like your original one was), unless you can see us adding more values to it in the future. Perhaps something like data-drag-middle or data-drag-both or data-drag-range etc? Up to you!

sercxjo commented 4 years ago

Well, let be boolean bedata-drag-middle as it seems to me there is no need to configure other options

sercxjo commented 4 years ago

I adjusted my branch so that there were no unnecessary changes in the request. Added shot description in html page

LeaVerou commented 4 years ago

Merged, thanks!