@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.pkgd.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() :
|
|
@@ -7071,7 +7071,7 @@ version: 4.11.3-beta.0
|
|
|
7071
7071
|
if (!activeAnchor || !anchorAtCamera) {
|
|
7072
7072
|
return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
|
|
7073
7073
|
}
|
|
7074
|
-
var snapThreshold = this._calcSnapThreshold(
|
|
7074
|
+
var snapThreshold = this._calcSnapThreshold(position, activeAnchor);
|
|
7075
7075
|
var posDelta = flicking.animating ? state.delta : position - camera.position;
|
|
7076
7076
|
var absPosDelta = Math.abs(posDelta);
|
|
7077
7077
|
var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta;
|
|
@@ -7158,7 +7158,7 @@ version: 4.11.3-beta.0
|
|
|
7158
7158
|
var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera;
|
|
7159
7159
|
return adjacentAnchor;
|
|
7160
7160
|
};
|
|
7161
|
-
__proto._calcSnapThreshold = function (
|
|
7161
|
+
__proto._calcSnapThreshold = function (position, activeAnchor) {
|
|
7162
7162
|
var isNextDirection = position > activeAnchor.position;
|
|
7163
7163
|
var panel = activeAnchor.panel;
|
|
7164
7164
|
var panelSize = panel.size;
|
|
@@ -7169,7 +7169,7 @@ version: 4.11.3-beta.0
|
|
|
7169
7169
|
* |<------>|<------------>|
|
|
7170
7170
|
* [ |<-Anchor ]
|
|
7171
7171
|
*/
|
|
7172
|
-
return
|
|
7172
|
+
return isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev;
|
|
7173
7173
|
};
|
|
7174
7174
|
return SnapControl;
|
|
7175
7175
|
}(Control$1);
|
|
@@ -8395,11 +8395,13 @@ version: 4.11.3-beta.0
|
|
|
8395
8395
|
* @return {AnchorPoint | null}
|
|
8396
8396
|
*/
|
|
8397
8397
|
__proto.findActiveAnchor = function () {
|
|
8398
|
+
var _a;
|
|
8398
8399
|
var flicking = getFlickingAttached(this._flicking);
|
|
8399
|
-
var
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8400
|
+
var activePanel = flicking.control.activePanel;
|
|
8401
|
+
if (!activePanel) return null;
|
|
8402
|
+
return (_a = find$1(this._anchors, function (anchor) {
|
|
8403
|
+
return anchor.panel.index === activePanel.index;
|
|
8404
|
+
})) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
|
|
8403
8405
|
};
|
|
8404
8406
|
/**
|
|
8405
8407
|
* Clamp the given position between camera's range
|
|
@@ -12949,7 +12951,7 @@ version: 4.11.3-beta.0
|
|
|
12949
12951
|
* Flicking.VERSION; // ex) 4.0.0
|
|
12950
12952
|
* ```
|
|
12951
12953
|
*/
|
|
12952
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
12954
|
+
Flicking.VERSION = "4.11.3-beta.1";
|
|
12953
12955
|
return Flicking;
|
|
12954
12956
|
}(Component);
|
|
12955
12957
|
|