List of ideas for Range component
Provide the ability to drag the whole range (i.e. change upper & lower values at the same time while maintaining the same difference)
So sorry - I started working on this, then became quite ill (just a coincidence, I assure you!)
Just returned to it again but I see you've done the work for me! :-) Oh well, maybe I can be of help on something else in the future. I feel I owe you at least something for providing this fantastic framework, and I'm not exactly flush with cash...
You can still have it. Nobody started working on it. Thanks so much!
Nearly done. FYI - the animations have gone wonky on the double range (presumably since 2.0) I'll tackle those too.
Also, just so I don't forget, and to save opening a new issue... parking some more proposals for the double-range control that I'd feel comfortable implementing myself, and which I can add to as I think of 'em
PROPERTIES:
- [x] dragRange (Boolean) [def: false | true=enable dragging by whole range]
- [x] disableMin (Boolean) [def: false | true=disable dragging by min. handle]
- [x] disableMax (Boolean) [def: false | true=disable dragging by max. handle]
- [ ] maxRange (Number) [maximum allowable absolute difference between value.min & value.max]
- [ ] minRange (Number) [minimum allowable absolute difference between value.min & value.max]
- [ ] values (Array/Object?) [TBD, some means of providing non-linear values between min & max]
- [ ] coerceStep (Boolean) [def: false | true=round supplied values to the nearest valid step]
- [ ] coerceRange (Boolean) [def: false | true=round supplied values to the nearest within range]
- [ ] behaviour (String) ["swap"|"stop"|"force"]
- "swap"=upon dragging so value.max < value.min, the dragged item will swap from max to min, or vice versa (i.e. the current default behaviour.) NB Not applicable with minRange or maxRange.
- "stop"=dragging min or max so: i) value.min > value.max, or ii) range < minRange, or iii) range > maxRange is prevented, the dragged item stopped at the threshold.
- "force"=dragging min or max so: i) value.min > value.max, or ii) range < minRange, or iii) range > maxRange will automatically adjust the other item's value so i) value.min==value.max, or ii) range==minRange, or iii) range ==maxRange is maintained.. NB If value.min < min, or value.max > max then both items will stop.
- [ ] orientation (String) [def: "horizontal"|"vertical"]
- [ ] direction (String) [def: "ltr"|"rtl"]
- [ ] markerPosition (String) [def: "after" | "before"] Position of markers (& pips) relative to the slider.
- [ ] markerFrequency: (Number?) [TBD, some way to specify how regular the markers are. Possibly roll this &
markersinto the same prop?] - [ ] pipFrequency: (Number?) [TBD, as above, but enabling less-predominant markers as well]
- [ ] labelFrequency : (Number) [TBD, as above, but for value labels.]
- [ ] labelFormat : (?) [TBD, some mechanism for formatting label text (e.g. currency, time, etc.)]
- [ ] buttons (Boolean) [def: false | true=provide buttons for making finely-tuned adjustments to slider values.
- [ ] animationSpeed: (Number, or provide as a stylus variable) Specify speed of animations, or none.
EVENTS
- [ ] dragStart - User starts dragging
- [ ] dragStop - User stops dragging
- [ ] dragging - User is dragging
- [ ] update - Some value changed
API
- [ ] read/write options
- [ ] read/write values
Closing this issue. Will create a github project specific for the Range component.