@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.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(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
|
|
@@ -2640,7 +2640,7 @@ version: 4.11.3-beta.0
|
|
|
2640
2640
|
var position;
|
|
2641
2641
|
return __generator(this, function (_c) {
|
|
2642
2642
|
position = this._getPosition(panel, direction);
|
|
2643
|
-
this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
|
|
2643
|
+
this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
|
|
2644
2644
|
return [2 /*return*/, this._animateToPosition({
|
|
2645
2645
|
position: position,
|
|
2646
2646
|
duration: duration,
|
|
@@ -2682,7 +2682,7 @@ version: 4.11.3-beta.0
|
|
|
2682
2682
|
this._activePanel = control._activePanel;
|
|
2683
2683
|
this._controller = control._controller;
|
|
2684
2684
|
};
|
|
2685
|
-
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
|
|
2685
|
+
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) {
|
|
2686
2686
|
var _a;
|
|
2687
2687
|
var flicking = getFlickingAttached(this._flicking);
|
|
2688
2688
|
var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
|
|
@@ -2692,7 +2692,7 @@ version: 4.11.3-beta.0
|
|
|
2692
2692
|
index: panel.index,
|
|
2693
2693
|
panel: panel,
|
|
2694
2694
|
isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
|
|
2695
|
-
direction: getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
2695
|
+
direction: direction !== null && direction !== void 0 ? direction : getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
2696
2696
|
});
|
|
2697
2697
|
this._nextPanel = panel;
|
|
2698
2698
|
flicking.trigger(event);
|
|
@@ -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);
|
|
@@ -7921,7 +7921,7 @@ version: 4.11.3-beta.0
|
|
|
7921
7921
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7922
7922
|
* ```
|
|
7923
7923
|
*/
|
|
7924
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
7924
|
+
Flicking.VERSION = "4.11.3-beta.2";
|
|
7925
7925
|
return Flicking;
|
|
7926
7926
|
}(Component);
|
|
7927
7927
|
|