Commit be69656e authored by Maarten Brouwers's avatar Maarten Brouwers
Browse files

Adds pow and log transforms to the Slider component

Introduces two settings, `nonLinearBase` and `positionValueFunction` which change the way in which the position of the slider is translated to an actual value. 

Besides the default value of ‘linear' for `positionValueFunction`, 'pow' and a 'log' can be used.

*Example application*

In example below we want to focus on the most recent years, hence we use a logarithmic transformation of the slider:

          <div class="slider" data-slider data-initial-start="2010" data-initial-end="2015" data-step="1" data-start="1950" data-end="2016" data-position-value-function="log">
            <span class="slider-handle" data-slider-handle role="slider" tabindex="1" aria-controls="car_search_year_from"></span>
            <span class="slider-fill" data-slider-fill></span>
            <span class="slider-handle" data-slider-handle role="slider" tabindex="1" aria-controls="car_search_year_to"></span>
          </div>

Since I didn't get the test-framework to run I submitting this for now without tests, if it is absolutely necessary to do so, and this functionality is desired, allow me some time to fix that.
parent 91092ea7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment