Skip to content

Commit bfdcf95

Browse files
author
thyttan
committed
Slider:fix lint warn var declared in global scope
exFirst -> o.v.exFirst eyFirst -> o.v.eyFirst
1 parent c9e4a99 commit bfdcf95

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/Slider.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ exports.create = function(cb, conf) {
113113
o.f.dragSlider = e=>{
114114
"ram";
115115
if (o.v.ebLast==0) {
116-
exFirst = o.c.horizontal?e.y:e.x;
117-
eyFirst = o.c.horizontal?e.x:e.y;
116+
o.v.exFirst = o.c.horizontal?e.y:e.x;
117+
o.v.eyFirst = o.c.horizontal?e.x:e.y;
118118
}
119119

120120
// Only react if on allowed area.
121-
if (o.f.wasOnDragRect(exFirst, eyFirst)) {
121+
if (o.f.wasOnDragRect(o.v.exFirst, o.v.eyFirst)) {
122122
o.v.dragActive = true;
123123
if (!o.c.propagateDrag) E.stopEventPropagation&&E.stopEventPropagation();
124124

125125
if (o.v.timeoutID) {clearTimeout(o.v.timeoutID); o.v.timeoutID = undefined;}
126126
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);
127127

128-
if (useMap && o.f.wasOnIndicator(exFirst)) { // If draging starts on the indicator, adjust one-to-one.
128+
if (useMap && o.f.wasOnIndicator(o.v.exFirst)) { // If draging starts on the indicator, adjust one-to-one.
129129

130130
let input = !o.c.horizontal?
131131
Math.min((Y_MAX-e.y)-o.c.yStart-3*o.c.rounded/4, o.c.height):

0 commit comments

Comments
 (0)