rreusser / controls-state

⚙️ An object for managing state
https://observablehq.com/@rreusser/control-panel-2-prototype-test
21 stars 2 forks source link

Use default step based on min and max instead of fixed number of steps. #13

Closed marcofugaro closed 4 years ago

marcofugaro commented 4 years ago

Given this example configuration:

{
    buildings: {
      distance: 1,
    },
    fog: {
      radiusStart: 20,
      radiusEnd: 30,
    },
  },

Since right now the default number of steps is 10, this is what happens:

now

The last two slider jump 4 numbers at a time, and this isn't what the user wants.

With this PR it becomes like this:

after
rreusser commented 4 years ago

Seems good! Thanks for you attention to these ergonomic details. Do you want to publish a new version, or should I? 🙇

marcofugaro commented 4 years ago

You publish it! You have access on npm 🙂