You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
commit 933c6b339604a7cf1ac9d45bd37c2cbdc5cee035
Author: simeydotme <[email protected]>
Date: Sat Jul 24 18:30:03 2021 +0800
Add second argument for formatter functions
resolves#23
I modifed the arguments for the formatter functions, they both
now accept the original `(v)` value which means it should be backwards
compatible. But there is also an additional `(i)` argument which holds
the index of the handle/pip respectively depending if formatting a
handle or a pip.
commit c9437a0a479521bc27fa9fd388ffe64830476eb6
Author: simeydotme <[email protected]>
Date: Sat Jul 24 17:33:57 2021 +0800
Add styling wrappers for `prefix` and `suffix`
resolves#27
This commit adds a `<span>` wrapper around each prefix and suffix,
allowing finer control over the aesthetics of the pips, and floats.
**prefix** | `String` | `""` | A string to prefix to all displayed values
112
112
**suffix** | `String` | `""` | A string to suffix to all displayed values
113
113
**disabled** | `Boolean` | `false` | Determine if the slider is disabled, or enabled _(only disables interactions, and events)_
114
-
**formatter** | `Function` | `(v) => v` | A function to re-format values before they are displayed
115
-
**handleFormatter** | `Function` | `formatter` | A function to re-format values on the handle/float before they are displayed. Defaults to the same function given to the `formatter` property
114
+
**formatter** | `Function` | `(v,i) => v` | A function to re-format values before they are displayed (`v = value, i = pip index`)
115
+
**handleFormatter** | `Function` | `formatter` | A function to re-format values on the handle/float before they are displayed. Defaults to the same function given to the `formatter` property (`v = value, i = handle index`)
116
116
**springValues** | `Object` | `{ stiffness: 0.15, damping: 0.4 }` | Svelte spring physics object to change the behaviour of the handle when moving
0 commit comments