@egjs/flicking 4.11.3-beta.0 → 4.11.3-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/declaration/control/Control.d.ts +1 -1
- package/dist/flicking.cjs.js +8 -8
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +8 -8
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +8 -8
- 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 +8 -8
- 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/Control.ts +3 -3
- 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.2
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -6798,7 +6798,7 @@ version: 4.11.3-beta.0
|
|
|
6798
6798
|
var position;
|
|
6799
6799
|
return __generator(this, function (_c) {
|
|
6800
6800
|
position = this._getPosition(panel, direction);
|
|
6801
|
-
this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
|
|
6801
|
+
this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
|
|
6802
6802
|
return [2 /*return*/, this._animateToPosition({
|
|
6803
6803
|
position: position,
|
|
6804
6804
|
duration: duration,
|
|
@@ -6840,7 +6840,7 @@ version: 4.11.3-beta.0
|
|
|
6840
6840
|
this._activePanel = control._activePanel;
|
|
6841
6841
|
this._controller = control._controller;
|
|
6842
6842
|
};
|
|
6843
|
-
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
|
|
6843
|
+
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) {
|
|
6844
6844
|
var _a;
|
|
6845
6845
|
var flicking = getFlickingAttached(this._flicking);
|
|
6846
6846
|
var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
|
|
@@ -6850,7 +6850,7 @@ version: 4.11.3-beta.0
|
|
|
6850
6850
|
index: panel.index,
|
|
6851
6851
|
panel: panel,
|
|
6852
6852
|
isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
|
|
6853
|
-
direction: getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
6853
|
+
direction: direction !== null && direction !== void 0 ? direction : getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
6854
6854
|
});
|
|
6855
6855
|
this._nextPanel = panel;
|
|
6856
6856
|
flicking.trigger(event);
|
|
@@ -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);
|
|
@@ -12949,7 +12949,7 @@ version: 4.11.3-beta.0
|
|
|
12949
12949
|
* Flicking.VERSION; // ex) 4.0.0
|
|
12950
12950
|
* ```
|
|
12951
12951
|
*/
|
|
12952
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
12952
|
+
Flicking.VERSION = "4.11.3-beta.2";
|
|
12953
12953
|
return Flicking;
|
|
12954
12954
|
}(Component);
|
|
12955
12955
|
|