@egjs/flicking 4.12.0 → 4.12.1-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egjs/flicking",
3
- "version": "4.12.0",
3
+ "version": "4.12.1-beta.0",
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",
@@ -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;