@creative-web-solution/front-library 7.1.29 → 7.1.31
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 +10 -0
- package/Modules/DragSlider.ts +13 -9
- package/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Modules/DragSlider.ts
CHANGED
|
@@ -140,13 +140,11 @@ export default class DragSlider {
|
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
#cancelLinkClick = (): void => {
|
|
143
|
-
aClass(this.#$slider, this.#options.dragClass);
|
|
143
|
+
wait().then(() => aClass(this.#$slider, this.#options.dragClass));
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
#activeLinkClick = (): void => {
|
|
147
|
-
wait().then(() =>
|
|
148
|
-
rClass(this.#$slider, this.#options.dragClass);
|
|
149
|
-
});
|
|
147
|
+
wait().then(() => rClass(this.#$slider, this.#options.dragClass));
|
|
150
148
|
};
|
|
151
149
|
|
|
152
150
|
#onResize = (): void => {
|
|
@@ -455,8 +453,6 @@ export default class DragSlider {
|
|
|
455
453
|
$target: HTMLElement,
|
|
456
454
|
coords: FLib.Events.Gesture.Coords
|
|
457
455
|
): void => {
|
|
458
|
-
this.#cancelLinkClick();
|
|
459
|
-
|
|
460
456
|
this.#deltaMove.deltaX =
|
|
461
457
|
coords.pageX -
|
|
462
458
|
(this.#startDragCoords as FLib.Events.Gesture.Coords).pageX;
|
|
@@ -468,6 +464,8 @@ export default class DragSlider {
|
|
|
468
464
|
return;
|
|
469
465
|
}
|
|
470
466
|
|
|
467
|
+
this.#cancelLinkClick();
|
|
468
|
+
|
|
471
469
|
this.#deltaMove.newX = this.#deltaMove.deltaX + this.#deltaMove.x;
|
|
472
470
|
this.#deltaMove.newX = Math.max(
|
|
473
471
|
Math.min(this.#minXPos, this.#deltaMove.newX),
|
|
@@ -572,12 +570,18 @@ export default class DragSlider {
|
|
|
572
570
|
|
|
573
571
|
this.#currentSnapItem = ITEM;
|
|
574
572
|
|
|
575
|
-
const
|
|
573
|
+
const finalX = Math.max(
|
|
574
|
+
Math.min(
|
|
575
|
+
this.#minXPos,
|
|
576
|
+
-1 * ITEM.info.left + this.#siteOffsetLeft
|
|
577
|
+
),
|
|
578
|
+
this.#maxXPos
|
|
579
|
+
);
|
|
576
580
|
|
|
577
|
-
this.#options.onSnap?.(this.#getCallbackOptions(
|
|
581
|
+
this.#options.onSnap?.(this.#getCallbackOptions(finalX, ITEM));
|
|
578
582
|
|
|
579
583
|
return this.#options
|
|
580
|
-
._animMoveItem(this.#$list,
|
|
584
|
+
._animMoveItem(this.#$list, finalX, (x) => {
|
|
581
585
|
this.#deltaMove.x = x;
|
|
582
586
|
|
|
583
587
|
this.#options.onSnapUpdate?.(
|
package/README.md
CHANGED
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.31",
|
|
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": [],
|