Closed UriShX closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/zalo/cascade-studio/d0nmywkhb
✅ Preview: https://cascade-studio-git-steps-in-vars.zalo.vercel.app
Thanks for taking the time to review my PR mate.
I find the slider only moves when moving the bar with my mouse and not with my keyboard arrows (integrated laptop pc, running Linux, if that's important). "Step" does control the amount by which the slider (and thus the linked variable) increments/decrements.
I have added the following:
@param step controls the amount that the keyboard arrow keys will increment or decrement a value. Defaults to 1/100 (0.01). @param precision controls how many decimal places the slider can have (i.e. "0" is integers, "1" includes tenths, etc.). Defaults to 2 decimal places (0.00).
@example
let currentSliderValue = Slider("Radius", 30 , 20 , 40, false);
@examplelet currentSliderValue = Slider("Radius", 30 , 20 , 40, false, 0.01);
@examplelet currentSliderValue = Slider("Radius", 30 , 20 , 40, false, 0.01, 2);
For more precision in modelling gears, etc., I tried implementing ControlKit's steps and dp in Slider.
Had a bit of an issue with Intellisense's definitions. I did not manage to implement Integer type in ts. A possible candidate might be newtype-ts's
Integer
, but I don't really know how to add it to client rendered projects.