@egjs/flicking 4.12.1-beta.1 → 4.12.1-beta.2
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/dist/flicking.cjs.js +5 -3
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +5 -3
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +5 -3
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +23 -6
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +2 -2
- package/src/control/SnapControl.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egjs/flicking",
|
|
3
|
-
"version": "4.12.1-beta.
|
|
3
|
+
"version": "4.12.1-beta.2",
|
|
4
4
|
"description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.",
|
|
5
5
|
"main": "dist/flicking.cjs.js",
|
|
6
6
|
"module": "dist/flicking.esm.js",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"typescript-transform-paths": "^2.2.3"
|
|
140
140
|
},
|
|
141
141
|
"dependencies": {
|
|
142
|
-
"@egjs/axes": "^3.9.
|
|
142
|
+
"@egjs/axes": "^3.9.2-beta.0",
|
|
143
143
|
"@egjs/component": "^3.0.1",
|
|
144
144
|
"@egjs/imready": "^1.3.1",
|
|
145
145
|
"@egjs/list-differ": "^1.0.1"
|
|
@@ -109,8 +109,9 @@ class SnapControl extends Control {
|
|
|
109
109
|
if (snapDelta >= snapThreshold && snapDelta > 0) {
|
|
110
110
|
// Move to anchor at position
|
|
111
111
|
targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);
|
|
112
|
-
} else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {
|
|
112
|
+
} else if (absPosDelta >= flicking.threshold && absPosDelta > 0 && anchorAtCamera === activeAnchor) {
|
|
113
113
|
// Move to the adjacent panel
|
|
114
|
+
// console.log("moveToPosition anchorAtCamera activeAnchor absPosDelta", camera.position, anchorAtCamera, activeAnchor, absPosDelta, snapThreshold)
|
|
114
115
|
targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);
|
|
115
116
|
} else {
|
|
116
117
|
// Fallback to nearest panel from current camera
|
|
@@ -205,6 +206,7 @@ class SnapControl extends Control {
|
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
|
|
209
|
+
// console.log("_findAdjacentAnchor", position, posDelta, anchorAtCamera)
|
|
208
210
|
const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;
|
|
209
211
|
|
|
210
212
|
return adjacentAnchor;
|