@thinkpixellab-public/px-vue 3.0.47 → 3.0.49

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.
@@ -78,12 +78,15 @@ 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
  };
84
85
  },
85
86
  computed: {
86
87
  lethargyOverrides() {
88
+ // query strings overrides
89
+
87
90
  const stability = parseFloat(this.$route.query?.scrollStability);
88
91
  const sensitivity = parseFloat(this.$route.query?.scrollSensitivity);
89
92
  const tolerance = parseFloat(this.$route.query?.scrollTolerance);
@@ -100,6 +103,21 @@ export default {
100
103
  tolerance: tolerance || 1.1,
101
104
  };
102
105
  }
106
+
107
+ // windows overrides
108
+
109
+ if (
110
+ navigator.userAgent.indexOf('Win') != -1 ||
111
+ this.$route.query?.scroll == 'windows'
112
+ ) {
113
+ //console.log('[Windows scroll values enabled.]');
114
+ return {
115
+ stability: stability || 8,
116
+ sensitivity: sensitivity || 20,
117
+ tolerance: tolerance || 0.1,
118
+ };
119
+ }
120
+
103
121
  return null;
104
122
  },
105
123
  },
@@ -113,8 +131,11 @@ export default {
113
131
  oldKey: ov,
114
132
  index: newIndex,
115
133
  previousIndex: oldIndex,
134
+ interactionType: this.lastInteractionType,
116
135
  });
117
136
 
137
+ this.lastInteractionType = null;
138
+
118
139
  newIndex = this.selectedRelativeIndex(newIndex);
119
140
  oldIndex = this.selectedRelativeIndex(oldIndex);
120
141
 
@@ -205,6 +226,9 @@ export default {
205
226
  if (Math.abs(ev.delta.x) < 10) {
206
227
  gsap.to(this.dragElements, { x: 0 });
207
228
  } else {
229
+ this.lastInteractionType = 'drag';
230
+ this.$emit('drag-complete');
231
+
208
232
  if (ev.delta.x > 0) {
209
233
  this.previous();
210
234
  } else {
@@ -230,6 +254,9 @@ export default {
230
254
 
231
255
  if (check !== this.lethargyPrevCheck) {
232
256
  if (check) {
257
+ this.lastInteractionType = 'scroll';
258
+ this.$emit('scroll-complete');
259
+
233
260
  if (check > 0) {
234
261
  this.previous(false);
235
262
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkpixellab-public/px-vue",
3
- "version": "3.0.47",
3
+ "version": "3.0.49",
4
4
  "description": "General purpose Vue components and helpers that can be used across projects.",
5
5
  "author": "Pixel Lab",
6
6
  "license": "MIT",