Slider
is simply a composition of a single View
component, a single Canvas
component, and a set of default drawing operations to render common slider representations.0.005
. Smaller numbers are less sensitive, larger numbers more sensitive.Slider
value property and onChange
behavior follow this model.Canvas
. This property is much like the onDraw
property on the Canvas
view itself, but with additional arguments: (context
, width
, height
, value
).Slider
class, which can be passed directly as the onDraw
property:Slider.drawLinearHorizontal
Slider.drawLinearVertical
Slider.drawRotary
(Default)(mouseDownX, mouseDownY, sensitivity, valueAtDragStart, dragEvent)
. Respectively, these arguments are the x and y position of the mouse at the time of the mouseDown event, the sensitivity
of the slider as defined by the sensitivity
prop above, the slider value at the time the drag started, and the current SyntheticMouseEvent
for the drag operation.Slider
class, which can be passed directly as the mapDragGestureToValue
property:Slider.linearHorizontalGestureMap
Slider.linearVerticalGestureMap
Slider.rotaryGestureMap
(Default)