@creative-web-solution/front-library 7.1.32 → 7.1.34
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/CHANGELOG.md +8 -0
- package/Modules/DragSlider.ts +4 -9
- package/README.md +1 -1
- package/Types/DragSlider.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Modules/DragSlider.ts
CHANGED
|
@@ -186,7 +186,7 @@ export default class DragSlider {
|
|
|
186
186
|
);
|
|
187
187
|
|
|
188
188
|
if (prevIsDraggingActive !== this.#isDraggingActive) {
|
|
189
|
-
this.#options.onChangeState?.(this.#isDraggingActive);
|
|
189
|
+
this.#options.onChangeState?.(this.#isDraggingActive, this.#getCallbackOptions(this.#deltaMove.x));
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
this.#itemArray.length = 0;
|
|
@@ -216,14 +216,6 @@ export default class DragSlider {
|
|
|
216
216
|
|
|
217
217
|
if (!flag) {
|
|
218
218
|
this.#itemArray.push(DATA);
|
|
219
|
-
// this.#itemArray.push({
|
|
220
|
-
// ...DATA,
|
|
221
|
-
// "info": {
|
|
222
|
-
// ...ITEM_OFFSET,
|
|
223
|
-
// "left": ABS_LIST_DELTA + this.#siteOffsetLeft,
|
|
224
|
-
// "x": ABS_LIST_DELTA + this.#siteOffsetLeft
|
|
225
|
-
// }
|
|
226
|
-
// });
|
|
227
219
|
}
|
|
228
220
|
flag = true;
|
|
229
221
|
|
|
@@ -397,6 +389,9 @@ export default class DragSlider {
|
|
|
397
389
|
};
|
|
398
390
|
|
|
399
391
|
#getMaxMoveSize(): number {
|
|
392
|
+
if (Math.abs(this.#viewportInfo.width - this.#$list!.scrollWidth) < 1) {
|
|
393
|
+
return 0;
|
|
394
|
+
}
|
|
400
395
|
return (
|
|
401
396
|
this.#viewportInfo.width -
|
|
402
397
|
this.#$list!.scrollWidth -
|
package/README.md
CHANGED
package/Types/DragSlider.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ declare namespace FLib {
|
|
|
43
43
|
onMouseEnter?: Callback;
|
|
44
44
|
onMouseLeave?: Callback;
|
|
45
45
|
onInit?: Callback;
|
|
46
|
-
onChangeState?: (
|
|
46
|
+
onChangeState?: ( isActive: boolean, options: CallbackParam ) => void;
|
|
47
47
|
/**
|
|
48
48
|
* In px.
|
|
49
49
|
* @defaultValue 40
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@creative-web-solution/front-library",
|
|
3
3
|
"title": "Frontend library",
|
|
4
4
|
"description": "Frontend functions and modules",
|
|
5
|
-
"version": "7.1.
|
|
5
|
+
"version": "7.1.34",
|
|
6
6
|
"homepage": "https://github.com/creative-web-solution/front-library",
|
|
7
7
|
"author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
|
|
8
8
|
"keywords": [],
|