@egjs/flicking 4.8.0 → 4.8.1
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.esm.js +20 -6
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +20 -6
- 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 +115 -120
- 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 +1 -1
- package/src/control/AxesController.ts +1 -1
- package/src/control/SnapControl.ts +15 -3
- package/TODO.md +0 -3
package/dist/flicking.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ name: @egjs/flicking
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking
|
|
7
|
-
version: 4.8.
|
|
7
|
+
version: 4.8.1
|
|
8
8
|
*/
|
|
9
9
|
import Component, { ComponentEvent } from '@egjs/component';
|
|
10
10
|
import Axes, { PanInput } from '@egjs/axes';
|
|
@@ -2155,7 +2155,9 @@ function () {
|
|
|
2155
2155
|
};
|
|
2156
2156
|
|
|
2157
2157
|
this._onAxesChange = function () {
|
|
2158
|
-
|
|
2158
|
+
var _a;
|
|
2159
|
+
|
|
2160
|
+
_this._dragged = !!((_a = _this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled());
|
|
2159
2161
|
};
|
|
2160
2162
|
|
|
2161
2163
|
this._preventClickWhenDragged = function (e) {
|
|
@@ -3136,10 +3138,13 @@ function (_super) {
|
|
|
3136
3138
|
targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);
|
|
3137
3139
|
} else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {
|
|
3138
3140
|
// Move to the adjacent panel
|
|
3139
|
-
targetAnchor = this._findAdjacentAnchor(posDelta, anchorAtCamera);
|
|
3141
|
+
targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);
|
|
3140
3142
|
} else {
|
|
3141
3143
|
// Restore to active panel
|
|
3142
|
-
|
|
3144
|
+
return this.moveToPanel(activeAnchor.panel, {
|
|
3145
|
+
duration: duration,
|
|
3146
|
+
axesEvent: axesEvent
|
|
3147
|
+
});
|
|
3143
3148
|
}
|
|
3144
3149
|
|
|
3145
3150
|
this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);
|
|
@@ -3210,11 +3215,20 @@ function (_super) {
|
|
|
3210
3215
|
}
|
|
3211
3216
|
};
|
|
3212
3217
|
|
|
3213
|
-
__proto._findAdjacentAnchor = function (posDelta, anchorAtCamera) {
|
|
3218
|
+
__proto._findAdjacentAnchor = function (position, posDelta, anchorAtCamera) {
|
|
3214
3219
|
var _a;
|
|
3215
3220
|
|
|
3216
3221
|
var flicking = getFlickingAttached(this._flicking);
|
|
3217
3222
|
var camera = flicking.camera;
|
|
3223
|
+
|
|
3224
|
+
if (camera.circularEnabled) {
|
|
3225
|
+
var anchorIncludePosition = camera.findAnchorIncludePosition(position);
|
|
3226
|
+
|
|
3227
|
+
if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {
|
|
3228
|
+
return anchorIncludePosition;
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3218
3232
|
var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera;
|
|
3219
3233
|
return adjacentAnchor;
|
|
3220
3234
|
};
|
|
@@ -8457,7 +8471,7 @@ function (_super) {
|
|
|
8457
8471
|
*/
|
|
8458
8472
|
|
|
8459
8473
|
|
|
8460
|
-
Flicking.VERSION = "4.8.
|
|
8474
|
+
Flicking.VERSION = "4.8.1";
|
|
8461
8475
|
return Flicking;
|
|
8462
8476
|
}(Component);
|
|
8463
8477
|
|