Skip to content

Commit

Permalink
Slider: tweaks to Slider.md documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thyttan committed Oct 2, 2023
1 parent 7b5c7a8 commit 549a18d
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions modules/Slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,34 @@ Bangle.on("drag", slider.f.dragSlider);
R = Bangle.appRect; // For use when determining defaults below.

{
useMap:false, // Use the mapping feature?
useIncr:true, // Use the incementing feature?
horizontal:false, // Slider should be horizontal?
xStart:R.x2-R.w/4-4, // Leftmost x-coordinate. (Uppermost y-coordingat if horizontal)
width:R.w/4, // Width of the slider. (Height if horizontal)
yStart:R.y+4, // Uppermost y-coordinate. (Rightmost x-coordinate if horizontal)
height:R.h-10, // Height of the slider. (Width if horizontal)
steps:30, // Number of discrete steps of the slider.
oversizeR:0, // Determines if the mapping area should be extend outside the indicator (Right/Up).
oversizeL:0, // Determines if the mapping area should be extend outside the indicator (Left/Down).
timeout:1, // Second untill the slider times out.
colorFG:g.theme.fg2, // Forground color.
colorBG:g.theme.bg2, // Background color.
rounded:true, // Slider should have rounded corners?
propagateDrag:false, // Pass the drag event on down the handler chain?
autoProgress:false, // The slider should be able to progress automatically?
outerBorderSize:2, // The size of the visual border.
innerBorderSize:2, // The distance between visual border and the slider.
drawableSlider:true, // Should supply the sliders standard drawing mechanism?
dragableSlider:true, // Should supply the sliders standard interaction mechanisms?
currLevel:undefined, // The level to initate the slider with.
dragRect:R, // Accept input withing this rectangle.
useMap: false, // Use the mapping feature?
useIncr: true, // Use the incementing feature?
horizontal: false, // Slider should be horizontal?
xStart: R.x2-R.w/4-4, // Leftmost x-coordinate. (Uppermost y-coordinate if horizontal)
width: R.w/4, // Width of the slider. (Height if horizontal)
yStart: R.y+4, // Uppermost y-coordinate. (Rightmost x-coordinate if horizontal)
height: R.h-10, // Height of the slider. (Width if horizontal)
steps: 30, // Number of discrete steps of the slider.
oversizeR: 0, // Determines if the mapping area should be extend outside the indicator (Right/Up).
oversizeL: 0, // Determines if the mapping area should be extend outside the indicator (Left/Down).
timeout: 1, // Seconds untill the slider times out.
colorFG: g.theme.fg2, // Foreground color.
colorBG: g.theme.bg2, // Background color.
rounded: true, // Slider should have rounded corners?
propagateDrag: false, // Pass the drag event on down the handler chain?
autoProgress: false, // The slider should be able to progress automatically?
outerBorderSize: 2, // The size of the visual border.
innerBorderSize: 2, // The distance between visual border and the slider.
drawableSlider: true, // Should supply the sliders standard drawing mechanism?
dragableSlider: true, // Should supply the sliders standard interaction mechanisms?
currLevel: undefined, // The level to initate the slider with.
dragRect: R, // Accept input within this rectangle.
}
```

A slider initiated in the Web IDE terminal reveals its internals to a degree:
A slider initiated in the Web IDE terminal window reveals its internals to a degree:
```
>slider = require("Slider").create(()=>{},{autoProgress:true})
>slider = require("Slider").create(()=>{}, {autoProgress:true})
={
v: { level: 15, ebLast: 0, dy: 0 },
f: {
Expand Down

0 comments on commit 549a18d

Please sign in to comment.