@douyinfe/semi-foundation 2.35.0-beta.0 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/select/foundation.js +1 -1
- package/lib/cjs/slider/foundation.d.ts +1 -1
- package/lib/cjs/slider/foundation.js +12 -21
- package/lib/es/select/foundation.js +1 -1
- package/lib/es/slider/foundation.d.ts +1 -1
- package/lib/es/slider/foundation.js +12 -21
- package/package.json +2 -2
- package/select/foundation.ts +1 -1
- package/slider/foundation.ts +12 -20
|
@@ -275,7 +275,7 @@ class SelectFoundation extends _foundation.default {
|
|
|
275
275
|
|
|
276
276
|
const selectedValue = onChangeWithObject && typeof propValue !== 'undefined' ? propValue.value : propValue;
|
|
277
277
|
const selectedOptions = originalOptions.filter(option => option.value === selectedValue);
|
|
278
|
-
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined'; // If the current value, there is a matching option in the optionList
|
|
278
|
+
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined' && selectedValue !== null; // If the current value, there is a matching option in the optionList
|
|
279
279
|
|
|
280
280
|
if (selectedOptions.length) {
|
|
281
281
|
const selectedOption = selectedOptions[0];
|
|
@@ -130,7 +130,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
130
130
|
*
|
|
131
131
|
* @memberof SliderFoundation
|
|
132
132
|
*/
|
|
133
|
-
handleMousePos: (
|
|
133
|
+
handleMousePos: (clientX: number, clientY: number) => {
|
|
134
134
|
x: number;
|
|
135
135
|
y: number;
|
|
136
136
|
};
|
|
@@ -131,7 +131,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
131
131
|
*/
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
this.handleMousePos = (
|
|
134
|
+
this.handleMousePos = (clientX, clientY) => {
|
|
135
135
|
const parentRect = this._adapter.getParentRect();
|
|
136
136
|
|
|
137
137
|
const scrollParent = this._adapter.getScrollParentVal();
|
|
@@ -139,8 +139,8 @@ class SliderFoundation extends _foundation.default {
|
|
|
139
139
|
const parentX = parentRect ? parentRect.left : 0;
|
|
140
140
|
const parentY = parentRect ? parentRect.top : 0;
|
|
141
141
|
return {
|
|
142
|
-
x:
|
|
143
|
-
y:
|
|
142
|
+
x: clientX - parentX + scrollParent.scrollLeft,
|
|
143
|
+
y: clientY - parentY + scrollParent.scrollTop
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
146
|
/**
|
|
@@ -201,9 +201,9 @@ class SliderFoundation extends _foundation.default {
|
|
|
201
201
|
startPos = sliderY + len;
|
|
202
202
|
} else {
|
|
203
203
|
startPos = vertical ? sliderY : sliderX;
|
|
204
|
-
}
|
|
204
|
+
} // startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
|
|
205
|
+
// eslint-disable-next-line one-var
|
|
205
206
|
|
|
206
|
-
startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos; // eslint-disable-next-line one-var
|
|
207
207
|
|
|
208
208
|
let endPos;
|
|
209
209
|
|
|
@@ -211,9 +211,8 @@ class SliderFoundation extends _foundation.default {
|
|
|
211
211
|
endPos = sliderY;
|
|
212
212
|
} else {
|
|
213
213
|
endPos = vertical ? sliderY + sliderHeight : sliderX + sliderWidth;
|
|
214
|
-
}
|
|
214
|
+
} // endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
215
215
|
|
|
216
|
-
endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
217
216
|
|
|
218
217
|
if (vertical && verticalReverse) {
|
|
219
218
|
if (position >= startPos) {
|
|
@@ -266,7 +265,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
266
265
|
let stepValue;
|
|
267
266
|
|
|
268
267
|
if (vertical && verticalReverse) {
|
|
269
|
-
isMin = !isMin;
|
|
268
|
+
//isMin = !isMin;
|
|
270
269
|
stepValue = (startPos + len - pos) / len * (max - min) + min;
|
|
271
270
|
} else {
|
|
272
271
|
stepValue = (pos - startPos) / len * (max - min) + min;
|
|
@@ -288,11 +287,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
288
287
|
}
|
|
289
288
|
|
|
290
289
|
if (range && stepValue !== compareValue) {
|
|
291
|
-
|
|
292
|
-
return isMin ? [currentValue[0], stepValue] : [stepValue, currentValue[1]];
|
|
293
|
-
} else {
|
|
294
|
-
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
295
|
-
}
|
|
290
|
+
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
296
291
|
} else if (!range && stepValue !== compareValue) {
|
|
297
292
|
return stepValue;
|
|
298
293
|
} else {
|
|
@@ -329,11 +324,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
329
324
|
const len = vertical ? sliderHeight : sliderWidth;
|
|
330
325
|
|
|
331
326
|
if (range) {
|
|
332
|
-
|
|
333
|
-
return [startPos + len - (value[0] - min) * len / (max - min), startPos + len - (value[1] - min) * len / (max - min)];
|
|
334
|
-
} else {
|
|
335
|
-
return [(value[0] - min) * len / (max - min) + startPos, (value[1] - min) * len / (max - min) + startPos];
|
|
336
|
-
}
|
|
327
|
+
return [(value[0] - min) * len / (max - min) + startPos, (value[1] - min) * len / (max - min) + startPos];
|
|
337
328
|
} else {
|
|
338
329
|
return (value - min) * len / (max - min) + startPos;
|
|
339
330
|
}
|
|
@@ -491,7 +482,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
491
482
|
this._adapter.setDragging([dragging[0], true]);
|
|
492
483
|
}
|
|
493
484
|
|
|
494
|
-
const mousePos = this.handleMousePos(e.
|
|
485
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
495
486
|
let pos = vertical ? mousePos.y : mousePos.x;
|
|
496
487
|
|
|
497
488
|
if (!this._adapter.isEventFromHandle(e)) {
|
|
@@ -527,7 +518,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
527
518
|
}
|
|
528
519
|
|
|
529
520
|
this.onHandleEnter(chooseMovePos);
|
|
530
|
-
const mousePos = this.handleMousePos(e.
|
|
521
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
531
522
|
let pagePos = vertical ? mousePos.y : mousePos.x;
|
|
532
523
|
pagePos = pagePos - this._dragOffset;
|
|
533
524
|
|
|
@@ -827,7 +818,7 @@ class SliderFoundation extends _foundation.default {
|
|
|
827
818
|
const {
|
|
828
819
|
vertical
|
|
829
820
|
} = this.getProps();
|
|
830
|
-
const mousePos = this.handleMousePos(e.
|
|
821
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
831
822
|
const position = vertical ? mousePos.y : mousePos.x;
|
|
832
823
|
const isMin = this.checkWhichHandle(position);
|
|
833
824
|
const outPutValue = this.calculateOutputValue(position, isMin);
|
|
@@ -253,7 +253,7 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
253
253
|
|
|
254
254
|
const selectedValue = onChangeWithObject && typeof propValue !== 'undefined' ? propValue.value : propValue;
|
|
255
255
|
const selectedOptions = originalOptions.filter(option => option.value === selectedValue);
|
|
256
|
-
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined'; // If the current value, there is a matching option in the optionList
|
|
256
|
+
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined' && selectedValue !== null; // If the current value, there is a matching option in the optionList
|
|
257
257
|
|
|
258
258
|
if (selectedOptions.length) {
|
|
259
259
|
const selectedOption = selectedOptions[0];
|
|
@@ -130,7 +130,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
130
130
|
*
|
|
131
131
|
* @memberof SliderFoundation
|
|
132
132
|
*/
|
|
133
|
-
handleMousePos: (
|
|
133
|
+
handleMousePos: (clientX: number, clientY: number) => {
|
|
134
134
|
x: number;
|
|
135
135
|
y: number;
|
|
136
136
|
};
|
|
@@ -118,7 +118,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
118
118
|
*/
|
|
119
119
|
|
|
120
120
|
|
|
121
|
-
this.handleMousePos = (
|
|
121
|
+
this.handleMousePos = (clientX, clientY) => {
|
|
122
122
|
const parentRect = this._adapter.getParentRect();
|
|
123
123
|
|
|
124
124
|
const scrollParent = this._adapter.getScrollParentVal();
|
|
@@ -126,8 +126,8 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
126
126
|
const parentX = parentRect ? parentRect.left : 0;
|
|
127
127
|
const parentY = parentRect ? parentRect.top : 0;
|
|
128
128
|
return {
|
|
129
|
-
x:
|
|
130
|
-
y:
|
|
129
|
+
x: clientX - parentX + scrollParent.scrollLeft,
|
|
130
|
+
y: clientY - parentY + scrollParent.scrollTop
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
@@ -188,9 +188,9 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
188
188
|
startPos = sliderY + len;
|
|
189
189
|
} else {
|
|
190
190
|
startPos = vertical ? sliderY : sliderX;
|
|
191
|
-
}
|
|
191
|
+
} // startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
|
|
192
|
+
// eslint-disable-next-line one-var
|
|
192
193
|
|
|
193
|
-
startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos; // eslint-disable-next-line one-var
|
|
194
194
|
|
|
195
195
|
let endPos;
|
|
196
196
|
|
|
@@ -198,9 +198,8 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
198
198
|
endPos = sliderY;
|
|
199
199
|
} else {
|
|
200
200
|
endPos = vertical ? sliderY + sliderHeight : sliderX + sliderWidth;
|
|
201
|
-
}
|
|
201
|
+
} // endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
202
202
|
|
|
203
|
-
endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
204
203
|
|
|
205
204
|
if (vertical && verticalReverse) {
|
|
206
205
|
if (position >= startPos) {
|
|
@@ -253,7 +252,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
253
252
|
let stepValue;
|
|
254
253
|
|
|
255
254
|
if (vertical && verticalReverse) {
|
|
256
|
-
isMin = !isMin;
|
|
255
|
+
//isMin = !isMin;
|
|
257
256
|
stepValue = (startPos + len - pos) / len * (max - min) + min;
|
|
258
257
|
} else {
|
|
259
258
|
stepValue = (pos - startPos) / len * (max - min) + min;
|
|
@@ -275,11 +274,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
275
274
|
}
|
|
276
275
|
|
|
277
276
|
if (range && stepValue !== compareValue) {
|
|
278
|
-
|
|
279
|
-
return isMin ? [currentValue[0], stepValue] : [stepValue, currentValue[1]];
|
|
280
|
-
} else {
|
|
281
|
-
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
282
|
-
}
|
|
277
|
+
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
283
278
|
} else if (!range && stepValue !== compareValue) {
|
|
284
279
|
return stepValue;
|
|
285
280
|
} else {
|
|
@@ -316,11 +311,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
316
311
|
const len = vertical ? sliderHeight : sliderWidth;
|
|
317
312
|
|
|
318
313
|
if (range) {
|
|
319
|
-
|
|
320
|
-
return [startPos + len - (value[0] - min) * len / (max - min), startPos + len - (value[1] - min) * len / (max - min)];
|
|
321
|
-
} else {
|
|
322
|
-
return [(value[0] - min) * len / (max - min) + startPos, (value[1] - min) * len / (max - min) + startPos];
|
|
323
|
-
}
|
|
314
|
+
return [(value[0] - min) * len / (max - min) + startPos, (value[1] - min) * len / (max - min) + startPos];
|
|
324
315
|
} else {
|
|
325
316
|
return (value - min) * len / (max - min) + startPos;
|
|
326
317
|
}
|
|
@@ -478,7 +469,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
478
469
|
this._adapter.setDragging([dragging[0], true]);
|
|
479
470
|
}
|
|
480
471
|
|
|
481
|
-
const mousePos = this.handleMousePos(e.
|
|
472
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
482
473
|
let pos = vertical ? mousePos.y : mousePos.x;
|
|
483
474
|
|
|
484
475
|
if (!this._adapter.isEventFromHandle(e)) {
|
|
@@ -514,7 +505,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
514
505
|
}
|
|
515
506
|
|
|
516
507
|
this.onHandleEnter(chooseMovePos);
|
|
517
|
-
const mousePos = this.handleMousePos(e.
|
|
508
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
518
509
|
let pagePos = vertical ? mousePos.y : mousePos.x;
|
|
519
510
|
pagePos = pagePos - this._dragOffset;
|
|
520
511
|
|
|
@@ -814,7 +805,7 @@ export default class SliderFoundation extends BaseFoundation {
|
|
|
814
805
|
const {
|
|
815
806
|
vertical
|
|
816
807
|
} = this.getProps();
|
|
817
|
-
const mousePos = this.handleMousePos(e.
|
|
808
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
818
809
|
const position = vertical ? mousePos.y : mousePos.x;
|
|
819
810
|
const isMin = this.checkWhichHandle(position);
|
|
820
811
|
const outPutValue = this.calculateOutputValue(position, isMin);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.35.0
|
|
3
|
+
"version": "2.35.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "bddc219454c94eef034a483a41072e41b4c84bc2",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/select/foundation.ts
CHANGED
|
@@ -247,7 +247,7 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
|
|
|
247
247
|
const selectedValue = onChangeWithObject && typeof propValue !== 'undefined' ? (propValue as BasicOptionProps).value : propValue;
|
|
248
248
|
const selectedOptions = originalOptions.filter(option => option.value === selectedValue);
|
|
249
249
|
|
|
250
|
-
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined';
|
|
250
|
+
const noMatchOptionInList = !selectedOptions.length && typeof selectedValue !== 'undefined' && selectedValue !== null;
|
|
251
251
|
|
|
252
252
|
// If the current value, there is a matching option in the optionList
|
|
253
253
|
if (selectedOptions.length) {
|
package/slider/foundation.ts
CHANGED
|
@@ -219,12 +219,12 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
219
219
|
*
|
|
220
220
|
* @memberof SliderFoundation
|
|
221
221
|
*/
|
|
222
|
-
handleMousePos = (
|
|
222
|
+
handleMousePos = (clientX: number, clientY: number) => {
|
|
223
223
|
const parentRect = this._adapter.getParentRect();
|
|
224
224
|
const scrollParent = this._adapter.getScrollParentVal();
|
|
225
225
|
const parentX = parentRect ? parentRect.left : 0;
|
|
226
226
|
const parentY = parentRect ? parentRect.top : 0;
|
|
227
|
-
return { x:
|
|
227
|
+
return { x: clientX - parentX + scrollParent.scrollLeft, y: clientY - parentY + scrollParent.scrollTop };
|
|
228
228
|
};
|
|
229
229
|
|
|
230
230
|
/**
|
|
@@ -268,7 +268,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
268
268
|
} else {
|
|
269
269
|
startPos = vertical ? sliderY : sliderX;
|
|
270
270
|
}
|
|
271
|
-
startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
|
|
271
|
+
// startPos = chooseMovePos === 'max' && isDrag ? currentPos[0] : startPos;
|
|
272
272
|
// eslint-disable-next-line one-var
|
|
273
273
|
let endPos;
|
|
274
274
|
if (vertical && verticalReverse) {
|
|
@@ -276,7 +276,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
276
276
|
} else {
|
|
277
277
|
endPos = vertical ? sliderY + sliderHeight : sliderX + sliderWidth;
|
|
278
278
|
}
|
|
279
|
-
endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
279
|
+
// endPos = chooseMovePos === 'min' && isDrag && range ? currentPos[1] : endPos;
|
|
280
280
|
|
|
281
281
|
|
|
282
282
|
if (vertical && verticalReverse) {
|
|
@@ -309,7 +309,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
309
309
|
const len = vertical ? sliderHeight : sliderWidth;
|
|
310
310
|
let stepValue;
|
|
311
311
|
if (vertical && verticalReverse) {
|
|
312
|
-
isMin = !isMin;
|
|
312
|
+
//isMin = !isMin;
|
|
313
313
|
stepValue = ((startPos + len - pos) / len) * (max - min) + min;
|
|
314
314
|
} else {
|
|
315
315
|
stepValue = ((pos - startPos) / len) * (max - min) + min;
|
|
@@ -326,11 +326,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
326
326
|
stepValue = Math.round(stepValue / step) * step;
|
|
327
327
|
}
|
|
328
328
|
if (range && stepValue !== compareValue) {
|
|
329
|
-
|
|
330
|
-
return (isMin ? [currentValue[0], stepValue] : [stepValue, currentValue[1]]);
|
|
331
|
-
} else {
|
|
332
|
-
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
333
|
-
}
|
|
329
|
+
return isMin ? [stepValue, currentValue[1]] : [currentValue[0], stepValue];
|
|
334
330
|
|
|
335
331
|
} else if (!range && stepValue !== compareValue) {
|
|
336
332
|
return (stepValue);
|
|
@@ -351,11 +347,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
351
347
|
const startPos = vertical ? sliderY : sliderX;
|
|
352
348
|
const len = vertical ? sliderHeight : sliderWidth;
|
|
353
349
|
if (range) {
|
|
354
|
-
|
|
355
|
-
return [startPos + len - ((value[0] - min) * len) / (max - min), startPos + len - ((value[1] - min) * len) / (max - min)];
|
|
356
|
-
} else {
|
|
357
|
-
return [((value[0] - min) * len) / (max - min) + startPos, ((value[1] - min) * len) / (max - min) + startPos];
|
|
358
|
-
}
|
|
350
|
+
return [((value[0] - min) * len) / (max - min) + startPos, ((value[1] - min) * len) / (max - min) + startPos];
|
|
359
351
|
} else {
|
|
360
352
|
return ((value as number - min) * len) / (max - min) + startPos;
|
|
361
353
|
}
|
|
@@ -386,9 +378,9 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
386
378
|
* @memberof SliderFoundation
|
|
387
379
|
*/
|
|
388
380
|
outPutValue = (inputValue: SliderProps['value']) => {
|
|
389
|
-
const checkHowManyDecimals = (num:number)=>{
|
|
381
|
+
const checkHowManyDecimals = (num: number)=>{
|
|
390
382
|
const reg = /^\d+(\.\d+)?$/;
|
|
391
|
-
if (reg.test(String(num))){
|
|
383
|
+
if (reg.test(String(num))) {
|
|
392
384
|
return num.toString().split('.')[1]?.length ?? 0;
|
|
393
385
|
}
|
|
394
386
|
return 0;
|
|
@@ -479,7 +471,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
479
471
|
this._adapter.setDragging([dragging[0], true]);
|
|
480
472
|
}
|
|
481
473
|
|
|
482
|
-
const mousePos = this.handleMousePos(e.
|
|
474
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
483
475
|
let pos = vertical ? mousePos.y : mousePos.x;
|
|
484
476
|
if (!this._adapter.isEventFromHandle(e)) {
|
|
485
477
|
this._dragOffset = 0;
|
|
@@ -500,7 +492,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
500
492
|
return false;
|
|
501
493
|
}
|
|
502
494
|
this.onHandleEnter(chooseMovePos);
|
|
503
|
-
const mousePos = this.handleMousePos(e.
|
|
495
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
504
496
|
let pagePos = vertical ? mousePos.y : mousePos.x;
|
|
505
497
|
pagePos = pagePos - this._dragOffset;
|
|
506
498
|
if ((chooseMovePos === 'min' && dragging[0]) || (chooseMovePos === 'max' && dragging[1])) {
|
|
@@ -720,7 +712,7 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
|
|
|
720
712
|
return;
|
|
721
713
|
}
|
|
722
714
|
const { vertical } = this.getProps();
|
|
723
|
-
const mousePos = this.handleMousePos(e.
|
|
715
|
+
const mousePos = this.handleMousePos(e.clientX, e.clientY);
|
|
724
716
|
const position = vertical ? mousePos.y : mousePos.x;
|
|
725
717
|
const isMin = this.checkWhichHandle(position);
|
|
726
718
|
|