@egjs/flicking 4.11.3-beta.1 → 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 +9 -11
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +9 -11
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +9 -11
- 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 +9 -11
- 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 +2 -4
- package/src/control/Control.ts +3 -3
|
@@ -33,7 +33,7 @@ declare abstract class Control {
|
|
|
33
33
|
}): Promise<void>;
|
|
34
34
|
setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean): void;
|
|
35
35
|
copy(control: Control): void;
|
|
36
|
-
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease): void;
|
|
36
|
+
protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf<typeof DIRECTION>): void;
|
|
37
37
|
protected _animateToPosition({ position, duration, newActivePanel, axesEvent }: {
|
|
38
38
|
position: number;
|
|
39
39
|
duration: number;
|
package/dist/flicking.cjs.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
|
'use strict';
|
|
10
10
|
|
|
@@ -2595,7 +2595,7 @@ var Control = /*#__PURE__*/function () {
|
|
|
2595
2595
|
var position;
|
|
2596
2596
|
return __generator(this, function (_c) {
|
|
2597
2597
|
position = this._getPosition(panel, direction);
|
|
2598
|
-
this._triggerIndexChangeEvent(panel, panel.position, axesEvent);
|
|
2598
|
+
this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);
|
|
2599
2599
|
return [2 /*return*/, this._animateToPosition({
|
|
2600
2600
|
position: position,
|
|
2601
2601
|
duration: duration,
|
|
@@ -2637,7 +2637,7 @@ var Control = /*#__PURE__*/function () {
|
|
|
2637
2637
|
this._activePanel = control._activePanel;
|
|
2638
2638
|
this._controller = control._controller;
|
|
2639
2639
|
};
|
|
2640
|
-
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
|
|
2640
|
+
__proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) {
|
|
2641
2641
|
var _a;
|
|
2642
2642
|
var flicking = getFlickingAttached(this._flicking);
|
|
2643
2643
|
var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;
|
|
@@ -2647,7 +2647,7 @@ var Control = /*#__PURE__*/function () {
|
|
|
2647
2647
|
index: panel.index,
|
|
2648
2648
|
panel: panel,
|
|
2649
2649
|
isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
|
|
2650
|
-
direction: getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
2650
|
+
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)
|
|
2651
2651
|
});
|
|
2652
2652
|
this._nextPanel = panel;
|
|
2653
2653
|
flicking.trigger(event);
|
|
@@ -4171,13 +4171,11 @@ var Camera = /*#__PURE__*/function () {
|
|
|
4171
4171
|
* @return {AnchorPoint | null}
|
|
4172
4172
|
*/
|
|
4173
4173
|
__proto.findActiveAnchor = function () {
|
|
4174
|
-
var _a;
|
|
4175
4174
|
var flicking = getFlickingAttached(this._flicking);
|
|
4176
|
-
var
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
})) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position);
|
|
4175
|
+
var activeIndex = flicking.control.activeIndex;
|
|
4176
|
+
return find(this._anchors, function (anchor) {
|
|
4177
|
+
return anchor.panel.index === activeIndex;
|
|
4178
|
+
});
|
|
4181
4179
|
};
|
|
4182
4180
|
/**
|
|
4183
4181
|
* Clamp the given position between camera's range
|
|
@@ -7830,7 +7828,7 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
7830
7828
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7831
7829
|
* ```
|
|
7832
7830
|
*/
|
|
7833
|
-
Flicking.VERSION = "4.11.3-beta.
|
|
7831
|
+
Flicking.VERSION = "4.11.3-beta.2";
|
|
7834
7832
|
return Flicking;
|
|
7835
7833
|
}(Component);
|
|
7836
7834
|
|