@thinkpixellab-public/px-vue 3.0.48 → 3.0.50
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/components/PxFloat.vue +0 -1
- package/components/PxSlides.vue +10 -0
- package/package.json +1 -1
package/components/PxFloat.vue
CHANGED
|
@@ -499,7 +499,6 @@ export default {
|
|
|
499
499
|
middlewareData?.flip && Object.keys(middlewareData.flip).length
|
|
500
500
|
);
|
|
501
501
|
|
|
502
|
-
console.log(`middlewareData: 👉 ${JSON.stringify(middlewareData, null, 4)}`);
|
|
503
502
|
if (this.useTranslate) {
|
|
504
503
|
this.positionCss = {
|
|
505
504
|
transform: `translate(${this.cssPx(x)},${this.cssPx(y)})`,
|
package/components/PxSlides.vue
CHANGED
|
@@ -78,6 +78,7 @@ export default {
|
|
|
78
78
|
data() {
|
|
79
79
|
return {
|
|
80
80
|
direction: 1,
|
|
81
|
+
lastInteractionType: null,
|
|
81
82
|
activeTransitions: 0,
|
|
82
83
|
scrollPreview: 0,
|
|
83
84
|
};
|
|
@@ -130,8 +131,11 @@ export default {
|
|
|
130
131
|
oldKey: ov,
|
|
131
132
|
index: newIndex,
|
|
132
133
|
previousIndex: oldIndex,
|
|
134
|
+
interactionType: this.lastInteractionType,
|
|
133
135
|
});
|
|
134
136
|
|
|
137
|
+
this.lastInteractionType = null;
|
|
138
|
+
|
|
135
139
|
newIndex = this.selectedRelativeIndex(newIndex);
|
|
136
140
|
oldIndex = this.selectedRelativeIndex(oldIndex);
|
|
137
141
|
|
|
@@ -222,6 +226,9 @@ export default {
|
|
|
222
226
|
if (Math.abs(ev.delta.x) < 10) {
|
|
223
227
|
gsap.to(this.dragElements, { x: 0 });
|
|
224
228
|
} else {
|
|
229
|
+
this.lastInteractionType = 'drag';
|
|
230
|
+
this.$emit('drag-complete');
|
|
231
|
+
|
|
225
232
|
if (ev.delta.x > 0) {
|
|
226
233
|
this.previous();
|
|
227
234
|
} else {
|
|
@@ -247,6 +254,9 @@ export default {
|
|
|
247
254
|
|
|
248
255
|
if (check !== this.lethargyPrevCheck) {
|
|
249
256
|
if (check) {
|
|
257
|
+
this.lastInteractionType = 'scroll';
|
|
258
|
+
this.$emit('scroll-complete');
|
|
259
|
+
|
|
250
260
|
if (check > 0) {
|
|
251
261
|
this.previous(false);
|
|
252
262
|
} else {
|