Slider: move let statement out of function scope

master
thyttan 2023-10-12 00:25:01 +02:00
parent 9d532a82d9
commit b2a72dccc7
1 changed files with 4 additions and 3 deletions

View File

@ -68,6 +68,10 @@ try { // For making it possiblie to run the test app in the following catch stat
// Only add interactivity if wanted. // Only add interactivity if wanted.
if (o.c.dragableSlider) { if (o.c.dragableSlider) {
let useMap = (o.c.mode==="map"||o.c.mode==="mapincr")?true:false;
let useIncr = (o.c.mode==="incr"||o.c.mode==="mapincr")?true:false;
const Y_MAX = g.getHeight()-1; // Should this take users screen calibration into account? const Y_MAX = g.getHeight()-1; // Should this take users screen calibration into account?
o.v.ebLast = 0; o.v.ebLast = 0;
@ -92,9 +96,6 @@ try { // For making it possiblie to run the test app in the following catch stat
eyFirst = o.c.horizontal?e.x:e.y; eyFirst = o.c.horizontal?e.x:e.y;
} }
let useMap = (o.c.mode==="map"||o.c.mode==="mapincr")?true:false;
let useIncr = (o.c.mode==="incr"||o.c.mode==="mapincr")?true:false;
// Only react if on allowed area. // Only react if on allowed area.
if (o.f.wasOnDragRect(exFirst, eyFirst)) { if (o.f.wasOnDragRect(exFirst, eyFirst)) {
o.v.dragActive = true; o.v.dragActive = true;