mirror of
https://github.com/enso-org/enso.git
synced 2024-11-24 00:27:16 +03:00
4ae2cb1e2a
This `Slider` component allows adjusting a numeric value with the mouse. The value is increased or decreased by clicking on the component and dragging it to the left or right. The `Slider` has a configurable default value. `Ctrl`+clicking on the component resets its value to that default. When the value is moved away from the default, the value is printed in **bold**. The `Slider` precision is increased or decreased by clicking the component and dragging upward or downward. This precision influences how quickly the value changes when the mouse moves horizontally, the steps in which the value is incremented or decremented, and the number of digits used to display the value. There is a margin around the component within which the precision is not changed. Beyond this margin, the precision is increased or decreased in powers of 10 (e.g. `0.1` -> `0.01` -> `0.001` when moving the mouse downwards, or `0.1` -> `1.0` -> `10.0` when moving the mouse upwards). The margin and distance between consecutive steps along the vertical axis are configurable. The value of the `Slider` is limited to a configurable range, and cannot be adjusted beyond that range. A colored bar fills the component to indicate the current value within the range. #### Video demonstration https://user-images.githubusercontent.com/117099775/202244982-2f6f419d-7281-41f6-8607-7e492ad25b46.mp4 #### Future additions This is the first iteration of the `Slider` component. Additional features are planned for the future: * Textual editing of the value. * Improved visual feedback on precision changes. * Additional out-of-range behaviors.
12 lines
348 B
YAML
12 lines
348 B
YAML
# Options intended to be common for all developers.
|
|
|
|
wasm-size-limit: 14.95 MiB
|
|
|
|
required-versions:
|
|
cargo-watch: ^8.1.1
|
|
node: =16.15.0
|
|
wasm-pack: ^0.10.2
|
|
# TODO [mwu]: Script can install `flatc` later on (if `conda` is present), so this is not required. However it should
|
|
# be required, if `conda` is missing.
|
|
# flatc: =1.12.0
|