@egjs/flicking 4.11.3-beta.0 → 4.11.3-beta.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.cjs.js +11 -9
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +11 -9
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +11 -9
- 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 +11 -9
- 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/camera/Camera.ts +4 -2
- package/src/control/SnapControl.ts +4 -4
package/dist/flicking.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.11.3-beta.
|
|
7
|
+
version: 4.11.3-beta.1
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
|
|
@@ -2913,7 +2913,7 @@ version: 4.11.3-beta.0
|
|
|
2913
2913
|
if (!activeAnchor || !anchorAtCamera) {
|
|
2914
2914
|
return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
|
|
2915
2915
|
}
|
|
2916
|
-
var snapThreshold = this._calcSnapThreshold(
|
|
2916
|
+
var snapThreshold = this._calcSnapThreshold(position, activeAnchor);
|
|
2917
2917
|
var posDelta = flicking.animating ? state.delta : position - camera.position;
|
|
2918
2918
|
var absPosDelta = Math.abs(posDelta);
|
|
2919
2919
|
var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta;
|
|
@@ -3000,7 +3000,7 @@ version: 4.11.3-beta.0
|
|
|
3000
3000
|
var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera;
|
|
3001
3001
|
return adjacentAnchor;
|
|
3002
3002
|
};
|
|
3003
|
-
__proto._calcSnapThreshold = function (
|
|
3003
|
+
__proto._calcSnapThreshold = function (position, activeAnchor) {
|
|
3004
3004
|
var isNextDirection = position > activeAnchor.position;
|
|
3005
3005
|
var panel = activeAnchor.panel;
|
|
3006
3006
|
var panelSize = panel.size;
|
|
@@ -3011,7 +3011,7 @@ version: 4.11.3-beta.0
|
|
|
3011
3011
|
* |<------>|<------------>|
|
|
3012
3012
|
* [ |<-Anchor ]
|
|
3013
3013
|
*/
|
|
3014
|
-
return
|
|
3014
|
+
return isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev;
|
|
3015
3015
|
};
|
|
3016
3016
|
return SnapControl;
|
|
3017
3017
|
}(Control$1);
|
|
@@ -4237,11 +4237,13 @@ version: 4.11.3-beta.0
|
|
|
4237
4237
|
* @return {AnchorPoint | null}
|
|
4238
4238
|
*/
|
|
4239
4239
|
__proto.findActiveAnchor = function () {
|
|
4240
|
+
var _a;
|
|
4240
4241
|
var flicking = getFlickingAttached(this._flicking);
|
|
4241
|
-
var
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4242
|
+
var activePanel = flicking.control.activePanel;
|
|
4243
|
+
if (!activePanel) return null;
|
|
4244
|
+
return (_a = find(this._anchors, function (anchor) {
|
|
4245
|
+
return anchor.panel.index === activePanel.index;
|
|
4246
|
+
})) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
|
|
4245
4247
|
};
|
|
4246
4248
|
/**
|
|
4247
4249
|
* Clamp the given position between camera's range
|
|
@@ -7921,7 +7923,7 @@ version: 4.11.3-beta.0
|
|
|
7921
7923
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7922
7924
|
* ```
|
|
7923
7925
|
*/
|
|
7924
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
7926
|
+
Flicking.VERSION = "4.11.3-beta.1";
|
|
7925
7927
|
return Flicking;
|
|
7926
7928
|
}(Component);
|
|
7927
7929
|
|