@egjs/flicking 4.6.3 → 4.7.0
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/Flicking.d.ts +5 -1
- package/dist/flicking.esm.js +72 -50
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +72 -50
- 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 +2442 -4953
- 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 +3 -2
- package/src/Flicking.ts +14 -0
- package/src/control/AxesController.ts +4 -3
- package/TODO.md +0 -3
|
@@ -42,6 +42,7 @@ export interface FlickingOptions {
|
|
|
42
42
|
panelsPerView: number;
|
|
43
43
|
noPanelStyleOverride: boolean;
|
|
44
44
|
resizeOnContentsReady: boolean;
|
|
45
|
+
nested: boolean;
|
|
45
46
|
needPanelThreshold: number;
|
|
46
47
|
preventEventsBeforeInit: boolean;
|
|
47
48
|
deceleration: number;
|
|
@@ -87,6 +88,7 @@ declare class Flicking extends Component<FlickingEvents> {
|
|
|
87
88
|
private _noPanelStyleOverride;
|
|
88
89
|
private _resizeOnContentsReady;
|
|
89
90
|
private _virtual;
|
|
91
|
+
private _nested;
|
|
90
92
|
private _needPanelThreshold;
|
|
91
93
|
private _preventEventsBeforeInit;
|
|
92
94
|
private _deceleration;
|
|
@@ -139,6 +141,7 @@ declare class Flicking extends Component<FlickingEvents> {
|
|
|
139
141
|
get panelsPerView(): FlickingOptions["panelsPerView"];
|
|
140
142
|
get noPanelStyleOverride(): FlickingOptions["noPanelStyleOverride"];
|
|
141
143
|
get resizeOnContentsReady(): FlickingOptions["resizeOnContentsReady"];
|
|
144
|
+
get nested(): FlickingOptions["nested"];
|
|
142
145
|
get needPanelThreshold(): FlickingOptions["needPanelThreshold"];
|
|
143
146
|
get preventEventsBeforeInit(): FlickingOptions["preventEventsBeforeInit"];
|
|
144
147
|
get deceleration(): FlickingOptions["deceleration"];
|
|
@@ -173,6 +176,7 @@ declare class Flicking extends Component<FlickingEvents> {
|
|
|
173
176
|
set panelsPerView(val: FlickingOptions["panelsPerView"]);
|
|
174
177
|
set noPanelStyleOverride(val: FlickingOptions["noPanelStyleOverride"]);
|
|
175
178
|
set resizeOnContentsReady(val: FlickingOptions["resizeOnContentsReady"]);
|
|
179
|
+
set nested(val: FlickingOptions["nested"]);
|
|
176
180
|
set needPanelThreshold(val: FlickingOptions["needPanelThreshold"]);
|
|
177
181
|
set preventEventsBeforeInit(val: FlickingOptions["preventEventsBeforeInit"]);
|
|
178
182
|
set deceleration(val: FlickingOptions["deceleration"]);
|
|
@@ -189,7 +193,7 @@ declare class Flicking extends Component<FlickingEvents> {
|
|
|
189
193
|
set renderOnlyVisible(val: FlickingOptions["renderOnlyVisible"]);
|
|
190
194
|
set autoResize(val: FlickingOptions["autoResize"]);
|
|
191
195
|
set useResizeObserver(val: FlickingOptions["useResizeObserver"]);
|
|
192
|
-
constructor(root: HTMLElement | string, { align, defaultIndex, horizontal, circular, circularFallback, bound, adaptive, panelsPerView, noPanelStyleOverride, resizeOnContentsReady, needPanelThreshold, preventEventsBeforeInit, deceleration, duration, easing, inputType, moveType, threshold, interruptable, bounce, iOSEdgeSwipeThreshold, preventClickOnDrag, disableOnInit, renderOnlyVisible, virtual, autoInit, autoResize, useResizeObserver, resizeDebounce, maxResizeDebounce, externalRenderer, renderExternal }?: Partial<FlickingOptions>);
|
|
196
|
+
constructor(root: HTMLElement | string, { align, defaultIndex, horizontal, circular, circularFallback, bound, adaptive, panelsPerView, noPanelStyleOverride, resizeOnContentsReady, nested, needPanelThreshold, preventEventsBeforeInit, deceleration, duration, easing, inputType, moveType, threshold, interruptable, bounce, iOSEdgeSwipeThreshold, preventClickOnDrag, disableOnInit, renderOnlyVisible, virtual, autoInit, autoResize, useResizeObserver, resizeDebounce, maxResizeDebounce, externalRenderer, renderExternal }?: Partial<FlickingOptions>);
|
|
193
197
|
init(): Promise<void>;
|
|
194
198
|
destroy(): void;
|
|
195
199
|
prev(duration?: number): Promise<void>;
|
package/dist/flicking.esm.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.
|
|
7
|
+
version: 4.7.0
|
|
8
8
|
*/
|
|
9
9
|
import Component, { ComponentEvent } from '@egjs/component';
|
|
10
10
|
import Axes, { PanInput } from '@egjs/axes';
|
|
@@ -2261,7 +2261,7 @@ function () {
|
|
|
2261
2261
|
get: function () {
|
|
2262
2262
|
var _a, _b;
|
|
2263
2263
|
|
|
2264
|
-
return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.
|
|
2264
|
+
return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()) !== null && _b !== void 0 ? _b : false;
|
|
2265
2265
|
},
|
|
2266
2266
|
enumerable: false,
|
|
2267
2267
|
configurable: true
|
|
@@ -2332,6 +2332,7 @@ function () {
|
|
|
2332
2332
|
}, _a), {
|
|
2333
2333
|
deceleration: flicking.deceleration,
|
|
2334
2334
|
interruptable: flicking.interruptable,
|
|
2335
|
+
nested: flicking.nested,
|
|
2335
2336
|
easing: flicking.easing
|
|
2336
2337
|
});
|
|
2337
2338
|
this._panInput = new PanInput(flicking.viewport.element, {
|
|
@@ -2428,7 +2429,7 @@ function () {
|
|
|
2428
2429
|
axis.circular = [controlParams.circular, controlParams.circular];
|
|
2429
2430
|
axis.range = [controlParams.range.min, controlParams.range.max];
|
|
2430
2431
|
axis.bounce = parseBounce(flicking.bounce, camera.size);
|
|
2431
|
-
axes.
|
|
2432
|
+
axes.axisManager.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a));
|
|
2432
2433
|
return this;
|
|
2433
2434
|
};
|
|
2434
2435
|
/**
|
|
@@ -2544,7 +2545,7 @@ function () {
|
|
|
2544
2545
|
var camera = flicking.camera;
|
|
2545
2546
|
animate();
|
|
2546
2547
|
var newPos = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position;
|
|
2547
|
-
axes.
|
|
2548
|
+
axes.axisManager.set((_a = {}, _a[POSITION_KEY] = newPos, _a));
|
|
2548
2549
|
return Promise.resolve();
|
|
2549
2550
|
} else {
|
|
2550
2551
|
return new Promise(function (resolve, reject) {
|
|
@@ -6631,52 +6632,54 @@ function (_super) {
|
|
|
6631
6632
|
noPanelStyleOverride = _l === void 0 ? false : _l,
|
|
6632
6633
|
_m = _b.resizeOnContentsReady,
|
|
6633
6634
|
resizeOnContentsReady = _m === void 0 ? false : _m,
|
|
6634
|
-
_o = _b.
|
|
6635
|
-
|
|
6636
|
-
_p = _b.
|
|
6637
|
-
|
|
6638
|
-
_q = _b.
|
|
6639
|
-
|
|
6640
|
-
_r = _b.
|
|
6641
|
-
|
|
6642
|
-
_s = _b.
|
|
6643
|
-
|
|
6635
|
+
_o = _b.nested,
|
|
6636
|
+
nested = _o === void 0 ? false : _o,
|
|
6637
|
+
_p = _b.needPanelThreshold,
|
|
6638
|
+
needPanelThreshold = _p === void 0 ? 0 : _p,
|
|
6639
|
+
_q = _b.preventEventsBeforeInit,
|
|
6640
|
+
preventEventsBeforeInit = _q === void 0 ? true : _q,
|
|
6641
|
+
_r = _b.deceleration,
|
|
6642
|
+
deceleration = _r === void 0 ? 0.0075 : _r,
|
|
6643
|
+
_s = _b.duration,
|
|
6644
|
+
duration = _s === void 0 ? 500 : _s,
|
|
6645
|
+
_t = _b.easing,
|
|
6646
|
+
easing = _t === void 0 ? function (x) {
|
|
6644
6647
|
return 1 - Math.pow(1 - x, 3);
|
|
6645
|
-
} :
|
|
6646
|
-
|
|
6647
|
-
inputType =
|
|
6648
|
-
|
|
6649
|
-
moveType =
|
|
6650
|
-
|
|
6651
|
-
threshold =
|
|
6652
|
-
|
|
6653
|
-
interruptable =
|
|
6654
|
-
|
|
6655
|
-
bounce =
|
|
6656
|
-
|
|
6657
|
-
iOSEdgeSwipeThreshold =
|
|
6658
|
-
|
|
6659
|
-
preventClickOnDrag =
|
|
6660
|
-
|
|
6661
|
-
disableOnInit =
|
|
6662
|
-
|
|
6663
|
-
renderOnlyVisible =
|
|
6664
|
-
|
|
6665
|
-
virtual =
|
|
6666
|
-
|
|
6667
|
-
autoInit =
|
|
6668
|
-
|
|
6669
|
-
autoResize =
|
|
6670
|
-
|
|
6671
|
-
useResizeObserver =
|
|
6672
|
-
|
|
6673
|
-
resizeDebounce =
|
|
6674
|
-
|
|
6675
|
-
maxResizeDebounce =
|
|
6676
|
-
|
|
6677
|
-
externalRenderer =
|
|
6678
|
-
|
|
6679
|
-
renderExternal =
|
|
6648
|
+
} : _t,
|
|
6649
|
+
_u = _b.inputType,
|
|
6650
|
+
inputType = _u === void 0 ? ["mouse", "touch"] : _u,
|
|
6651
|
+
_v = _b.moveType,
|
|
6652
|
+
moveType = _v === void 0 ? "snap" : _v,
|
|
6653
|
+
_w = _b.threshold,
|
|
6654
|
+
threshold = _w === void 0 ? 40 : _w,
|
|
6655
|
+
_x = _b.interruptable,
|
|
6656
|
+
interruptable = _x === void 0 ? true : _x,
|
|
6657
|
+
_y = _b.bounce,
|
|
6658
|
+
bounce = _y === void 0 ? "20%" : _y,
|
|
6659
|
+
_z = _b.iOSEdgeSwipeThreshold,
|
|
6660
|
+
iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z,
|
|
6661
|
+
_0 = _b.preventClickOnDrag,
|
|
6662
|
+
preventClickOnDrag = _0 === void 0 ? true : _0,
|
|
6663
|
+
_1 = _b.disableOnInit,
|
|
6664
|
+
disableOnInit = _1 === void 0 ? false : _1,
|
|
6665
|
+
_2 = _b.renderOnlyVisible,
|
|
6666
|
+
renderOnlyVisible = _2 === void 0 ? false : _2,
|
|
6667
|
+
_3 = _b.virtual,
|
|
6668
|
+
virtual = _3 === void 0 ? null : _3,
|
|
6669
|
+
_4 = _b.autoInit,
|
|
6670
|
+
autoInit = _4 === void 0 ? true : _4,
|
|
6671
|
+
_5 = _b.autoResize,
|
|
6672
|
+
autoResize = _5 === void 0 ? true : _5,
|
|
6673
|
+
_6 = _b.useResizeObserver,
|
|
6674
|
+
useResizeObserver = _6 === void 0 ? true : _6,
|
|
6675
|
+
_7 = _b.resizeDebounce,
|
|
6676
|
+
resizeDebounce = _7 === void 0 ? 0 : _7,
|
|
6677
|
+
_8 = _b.maxResizeDebounce,
|
|
6678
|
+
maxResizeDebounce = _8 === void 0 ? 100 : _8,
|
|
6679
|
+
_9 = _b.externalRenderer,
|
|
6680
|
+
externalRenderer = _9 === void 0 ? null : _9,
|
|
6681
|
+
_10 = _b.renderExternal,
|
|
6682
|
+
renderExternal = _10 === void 0 ? null : _10;
|
|
6680
6683
|
|
|
6681
6684
|
var _this = _super.call(this) || this; // Internal states
|
|
6682
6685
|
|
|
@@ -6694,6 +6697,7 @@ function (_super) {
|
|
|
6694
6697
|
_this._panelsPerView = panelsPerView;
|
|
6695
6698
|
_this._noPanelStyleOverride = noPanelStyleOverride;
|
|
6696
6699
|
_this._resizeOnContentsReady = resizeOnContentsReady;
|
|
6700
|
+
_this._nested = nested;
|
|
6697
6701
|
_this._virtual = virtual;
|
|
6698
6702
|
_this._needPanelThreshold = needPanelThreshold;
|
|
6699
6703
|
_this._preventEventsBeforeInit = preventEventsBeforeInit;
|
|
@@ -7167,6 +7171,24 @@ function (_super) {
|
|
|
7167
7171
|
enumerable: false,
|
|
7168
7172
|
configurable: true
|
|
7169
7173
|
});
|
|
7174
|
+
Object.defineProperty(__proto, "nested", {
|
|
7175
|
+
/**
|
|
7176
|
+
* If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.
|
|
7177
|
+
* If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.
|
|
7178
|
+
* @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.
|
|
7179
|
+
* 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.
|
|
7180
|
+
* @type {boolean}
|
|
7181
|
+
* @default false
|
|
7182
|
+
*/
|
|
7183
|
+
get: function () {
|
|
7184
|
+
return this._nested;
|
|
7185
|
+
},
|
|
7186
|
+
set: function (val) {
|
|
7187
|
+
this._nested = val;
|
|
7188
|
+
},
|
|
7189
|
+
enumerable: false,
|
|
7190
|
+
configurable: true
|
|
7191
|
+
});
|
|
7170
7192
|
Object.defineProperty(__proto, "needPanelThreshold", {
|
|
7171
7193
|
// EVENTS
|
|
7172
7194
|
|
|
@@ -8403,7 +8425,7 @@ function (_super) {
|
|
|
8403
8425
|
*/
|
|
8404
8426
|
|
|
8405
8427
|
|
|
8406
|
-
Flicking.VERSION = "4.
|
|
8428
|
+
Flicking.VERSION = "4.7.0";
|
|
8407
8429
|
return Flicking;
|
|
8408
8430
|
}(Component);
|
|
8409
8431
|
|