1
0
Fork 0

Merge pull request #3261 from thyttan/slider

Slider:fix lint warn var declared in global scope
master
Rob Pilling 2024-03-15 08:55:16 +00:00 committed by GitHub
commit 5173e1c578
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -113,19 +113,19 @@ exports.create = function(cb, conf) {
o.f.dragSlider = e=>{
"ram";
if (o.v.ebLast==0) {
exFirst = o.c.horizontal?e.y:e.x;
eyFirst = o.c.horizontal?e.x:e.y;
o.v.exFirst = o.c.horizontal?e.y:e.x;
o.v.eyFirst = o.c.horizontal?e.x:e.y;
}
// Only react if on allowed area.
if (o.f.wasOnDragRect(exFirst, eyFirst)) {
if (o.f.wasOnDragRect(o.v.exFirst, o.v.eyFirst)) {
o.v.dragActive = true;
if (!o.c.propagateDrag) E.stopEventPropagation&&E.stopEventPropagation();
if (o.v.timeoutID) {clearTimeout(o.v.timeoutID); o.v.timeoutID = undefined;}
if (e.b==0 && !o.v.timeoutID && (o.c.timeout || o.c.timeout===0)) o.v.timeoutID = setTimeout(o.f.remove, 1000*o.c.timeout);
if (useMap && o.f.wasOnIndicator(exFirst)) { // If draging starts on the indicator, adjust one-to-one.
if (useMap && o.f.wasOnIndicator(o.v.exFirst)) { // If draging starts on the indicator, adjust one-to-one.
let input = !o.c.horizontal?
Math.min((Y_MAX-e.y)-o.c.yStart-3*o.c.rounded/4, o.c.height):