@egjs/flicking 4.10.4 → 4.10.5
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.esm.js +48 -9
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +48 -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 +48 -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/Flicking.ts +33 -2
- package/src/control/SnapControl.ts +2 -2
- package/src/control/StrictControl.ts +9 -3
- package/src/core/ResizeWatcher.ts +1 -1
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.10.
|
|
7
|
+
version: 4.10.5
|
|
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')) :
|
|
@@ -3365,8 +3365,8 @@ version: 4.10.4
|
|
|
3365
3365
|
// Move to the adjacent panel
|
|
3366
3366
|
targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);
|
|
3367
3367
|
} else {
|
|
3368
|
-
//
|
|
3369
|
-
return this.moveToPanel(
|
|
3368
|
+
// Fallback to nearest panel from current camera
|
|
3369
|
+
return this.moveToPanel(anchorAtCamera.panel, {
|
|
3370
3370
|
duration: duration,
|
|
3371
3371
|
axesEvent: axesEvent
|
|
3372
3372
|
});
|
|
@@ -3834,9 +3834,17 @@ version: 4.10.4
|
|
|
3834
3834
|
targetPanel = adjacentAnchor.panel;
|
|
3835
3835
|
targetPos = adjacentAnchor.position;
|
|
3836
3836
|
} else {
|
|
3837
|
-
//
|
|
3838
|
-
|
|
3839
|
-
|
|
3837
|
+
// Fallback to nearest panel from current camera
|
|
3838
|
+
var anchorAtCamera = camera.findNearestAnchor(camera.position);
|
|
3839
|
+
|
|
3840
|
+
if (!anchorAtCamera) {
|
|
3841
|
+
return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE));
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
return this.moveToPanel(anchorAtCamera.panel, {
|
|
3845
|
+
duration: duration,
|
|
3846
|
+
axesEvent: axesEvent
|
|
3847
|
+
});
|
|
3840
3848
|
}
|
|
3841
3849
|
|
|
3842
3850
|
this._triggerIndexChangeEvent(targetPanel, position, axesEvent);
|
|
@@ -7311,6 +7319,7 @@ version: 4.10.4
|
|
|
7311
7319
|
* @property {ALIGN | string | number} panel The align value for each {@link Panel}s<ko>개개의 {@link Panel}에 적용할 값</ko>
|
|
7312
7320
|
* @property {ALIGN | string | number} camera The align value for {@link Camera}<ko>{@link Camera}에 적용할 값</ko>
|
|
7313
7321
|
* @default "center"
|
|
7322
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}
|
|
7314
7323
|
* @example
|
|
7315
7324
|
* ```ts
|
|
7316
7325
|
* const possibleOptions = [
|
|
@@ -7351,6 +7360,7 @@ version: 4.10.4
|
|
|
7351
7360
|
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다
|
|
7352
7361
|
* @type {number}
|
|
7353
7362
|
* @default 0
|
|
7363
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}
|
|
7354
7364
|
*/
|
|
7355
7365
|
get: function () {
|
|
7356
7366
|
return this._defaultIndex;
|
|
@@ -7367,6 +7377,7 @@ version: 4.10.4
|
|
|
7367
7377
|
* @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)
|
|
7368
7378
|
* @type {boolean}
|
|
7369
7379
|
* @default true
|
|
7380
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}
|
|
7370
7381
|
*/
|
|
7371
7382
|
get: function () {
|
|
7372
7383
|
return this._horizontal;
|
|
@@ -7387,6 +7398,7 @@ version: 4.10.4
|
|
|
7387
7398
|
* @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.
|
|
7388
7399
|
* @type {boolean}
|
|
7389
7400
|
* @default false
|
|
7401
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}
|
|
7390
7402
|
*/
|
|
7391
7403
|
get: function () {
|
|
7392
7404
|
return this._circular;
|
|
@@ -7409,6 +7421,7 @@ version: 4.10.4
|
|
|
7409
7421
|
* @see CIRCULAR_FALLBACK
|
|
7410
7422
|
* @type {string}
|
|
7411
7423
|
* @default "linear"
|
|
7424
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}
|
|
7412
7425
|
*/
|
|
7413
7426
|
get: function () {
|
|
7414
7427
|
return this._circularFallback;
|
|
@@ -7424,6 +7437,7 @@ version: 4.10.4
|
|
|
7424
7437
|
* `circular=false`인 경우에만 사용할 수 있습니다
|
|
7425
7438
|
* @type {boolean}
|
|
7426
7439
|
* @default false
|
|
7440
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}
|
|
7427
7441
|
*/
|
|
7428
7442
|
get: function () {
|
|
7429
7443
|
return this._bound;
|
|
@@ -7441,6 +7455,7 @@ version: 4.10.4
|
|
|
7441
7455
|
* @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.
|
|
7442
7456
|
* @type {boolean}
|
|
7443
7457
|
* @default false
|
|
7458
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}
|
|
7444
7459
|
*/
|
|
7445
7460
|
get: function () {
|
|
7446
7461
|
return this._adaptive;
|
|
@@ -7458,6 +7473,7 @@ version: 4.10.4
|
|
|
7458
7473
|
* @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다
|
|
7459
7474
|
* @type {number}
|
|
7460
7475
|
* @default -1
|
|
7476
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}
|
|
7461
7477
|
*/
|
|
7462
7478
|
get: function () {
|
|
7463
7479
|
return this._panelsPerView;
|
|
@@ -7496,6 +7512,7 @@ version: 4.10.4
|
|
|
7496
7512
|
* 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.
|
|
7497
7513
|
* @type {boolean}
|
|
7498
7514
|
* @default false
|
|
7515
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}
|
|
7499
7516
|
*/
|
|
7500
7517
|
get: function () {
|
|
7501
7518
|
return this._resizeOnContentsReady;
|
|
@@ -7518,6 +7535,7 @@ version: 4.10.4
|
|
|
7518
7535
|
* 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.
|
|
7519
7536
|
* @type {boolean}
|
|
7520
7537
|
* @default false
|
|
7538
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}
|
|
7521
7539
|
*/
|
|
7522
7540
|
get: function () {
|
|
7523
7541
|
return this._nested;
|
|
@@ -7541,6 +7559,7 @@ version: 4.10.4
|
|
|
7541
7559
|
* @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리
|
|
7542
7560
|
* @type {number}
|
|
7543
7561
|
* @default 0
|
|
7562
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}
|
|
7544
7563
|
*/
|
|
7545
7564
|
get: function () {
|
|
7546
7565
|
return this._needPanelThreshold;
|
|
@@ -7558,6 +7577,7 @@ version: 4.10.4
|
|
|
7558
7577
|
* @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.
|
|
7559
7578
|
* @type {boolean}
|
|
7560
7579
|
* @default true
|
|
7580
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}
|
|
7561
7581
|
*/
|
|
7562
7582
|
get: function () {
|
|
7563
7583
|
return this._preventEventsBeforeInit;
|
|
@@ -7576,6 +7596,7 @@ version: 4.10.4
|
|
|
7576
7596
|
* @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다
|
|
7577
7597
|
* @type {number}
|
|
7578
7598
|
* @default 0.0075
|
|
7599
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}
|
|
7579
7600
|
*/
|
|
7580
7601
|
get: function () {
|
|
7581
7602
|
return this._deceleration;
|
|
@@ -7599,6 +7620,7 @@ version: 4.10.4
|
|
|
7599
7620
|
* @type {function}
|
|
7600
7621
|
* @default x => 1 - Math.pow(1 - x, 3)
|
|
7601
7622
|
* @see Easing Functions Cheat Sheet {@link http://easings.net/} <ko>이징 함수 Cheat Sheet {@link http://easings.net/}</ko>
|
|
7623
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}
|
|
7602
7624
|
*/
|
|
7603
7625
|
get: function () {
|
|
7604
7626
|
return this._easing;
|
|
@@ -7620,6 +7642,7 @@ version: 4.10.4
|
|
|
7620
7642
|
* @ko 디폴트 애니메이션 재생 시간 (ms)
|
|
7621
7643
|
* @type {number}
|
|
7622
7644
|
* @default 500
|
|
7645
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}
|
|
7623
7646
|
*/
|
|
7624
7647
|
get: function () {
|
|
7625
7648
|
return this._duration;
|
|
@@ -7638,8 +7661,9 @@ version: 4.10.4
|
|
|
7638
7661
|
* @ko 활성화할 입력 장치 종류
|
|
7639
7662
|
* @type {string[]}
|
|
7640
7663
|
* @default ["touch", "mouse"]
|
|
7641
|
-
* @see {@link https://naver.github.io/egjs-axes/
|
|
7642
|
-
* <ko>{@link https://naver.github.io/egjs-axes/
|
|
7664
|
+
* @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}
|
|
7665
|
+
* <ko>{@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}</ko>
|
|
7666
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}
|
|
7643
7667
|
*/
|
|
7644
7668
|
get: function () {
|
|
7645
7669
|
return this._inputType;
|
|
@@ -7664,6 +7688,7 @@ version: 4.10.4
|
|
|
7664
7688
|
* 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다
|
|
7665
7689
|
* @type {MOVE_TYPE | Pair<string, object>}
|
|
7666
7690
|
* @default "snap"
|
|
7691
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}
|
|
7667
7692
|
* @example
|
|
7668
7693
|
* |moveType|control|options|
|
|
7669
7694
|
* |:---:|:---:|:---:|
|
|
@@ -7714,6 +7739,7 @@ version: 4.10.4
|
|
|
7714
7739
|
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.
|
|
7715
7740
|
* @type {number}
|
|
7716
7741
|
* @default 40
|
|
7742
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}
|
|
7717
7743
|
*/
|
|
7718
7744
|
get: function () {
|
|
7719
7745
|
return this._threshold;
|
|
@@ -7730,6 +7756,7 @@ version: 4.10.4
|
|
|
7730
7756
|
* @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.
|
|
7731
7757
|
* @type {boolean}
|
|
7732
7758
|
* @default true
|
|
7759
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}
|
|
7733
7760
|
*/
|
|
7734
7761
|
get: function () {
|
|
7735
7762
|
return this._interruptable;
|
|
@@ -7757,6 +7784,7 @@ version: 4.10.4
|
|
|
7757
7784
|
* 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.
|
|
7758
7785
|
* @type {string | number | Array<string | number>}
|
|
7759
7786
|
* @default "20%"
|
|
7787
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}
|
|
7760
7788
|
* @example
|
|
7761
7789
|
* ```ts
|
|
7762
7790
|
* const possibleOptions = [
|
|
@@ -7794,6 +7822,7 @@ version: 4.10.4
|
|
|
7794
7822
|
* @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)
|
|
7795
7823
|
* @type {number}
|
|
7796
7824
|
* @default 30
|
|
7825
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}
|
|
7797
7826
|
*/
|
|
7798
7827
|
get: function () {
|
|
7799
7828
|
return this._iOSEdgeSwipeThreshold;
|
|
@@ -7815,6 +7844,7 @@ version: 4.10.4
|
|
|
7815
7844
|
* @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다
|
|
7816
7845
|
* @type {boolean}
|
|
7817
7846
|
* @default true
|
|
7847
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}
|
|
7818
7848
|
*/
|
|
7819
7849
|
get: function () {
|
|
7820
7850
|
return this._preventClickOnDrag;
|
|
@@ -7841,6 +7871,7 @@ version: 4.10.4
|
|
|
7841
7871
|
* @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다
|
|
7842
7872
|
* @type {boolean}
|
|
7843
7873
|
* @default false
|
|
7874
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}
|
|
7844
7875
|
*/
|
|
7845
7876
|
get: function () {
|
|
7846
7877
|
return this._disableOnInit;
|
|
@@ -7859,6 +7890,7 @@ version: 4.10.4
|
|
|
7859
7890
|
* `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
|
|
7860
7891
|
* @type {boolean}
|
|
7861
7892
|
* @default false
|
|
7893
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
|
|
7862
7894
|
*/
|
|
7863
7895
|
get: function () {
|
|
7864
7896
|
return this._changeOnHold;
|
|
@@ -7877,6 +7909,7 @@ version: 4.10.4
|
|
|
7877
7909
|
* @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다
|
|
7878
7910
|
* @type {boolean}
|
|
7879
7911
|
* @default false
|
|
7912
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}
|
|
7880
7913
|
*/
|
|
7881
7914
|
get: function () {
|
|
7882
7915
|
return this._renderOnlyVisible;
|
|
@@ -7902,6 +7935,7 @@ version: 4.10.4
|
|
|
7902
7935
|
* @property {number} initialPanelCount Initial panel count to render<ko>최초로 렌더링할 패널의 개수</ko>
|
|
7903
7936
|
* @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML<ko>렌더링된 패널의 innerHTML 정보를 캐시할지 여부</ko>
|
|
7904
7937
|
* @property {string} [panelClass="flicking-panel"] The class name that will be applied to rendered panel elements<ko>렌더링되는 패널 엘리먼트에 적용될 클래스 이름</ko>
|
|
7938
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}
|
|
7905
7939
|
* @example
|
|
7906
7940
|
* ```ts
|
|
7907
7941
|
* import Flicking, { VirtualPanel } from "@egjs/flicking";
|
|
@@ -7935,6 +7969,7 @@ version: 4.10.4
|
|
|
7935
7969
|
* @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다
|
|
7936
7970
|
* @type {boolean}
|
|
7937
7971
|
* @default true
|
|
7972
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}
|
|
7938
7973
|
* @readonly
|
|
7939
7974
|
*/
|
|
7940
7975
|
get: function () {
|
|
@@ -7972,6 +8007,7 @@ version: 4.10.4
|
|
|
7972
8007
|
* @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다
|
|
7973
8008
|
* @type {boolean}
|
|
7974
8009
|
* @default true
|
|
8010
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}
|
|
7975
8011
|
*/
|
|
7976
8012
|
get: function () {
|
|
7977
8013
|
return this._useResizeObserver;
|
|
@@ -7996,6 +8032,7 @@ version: 4.10.4
|
|
|
7996
8032
|
* 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.
|
|
7997
8033
|
* @type {number}
|
|
7998
8034
|
* @default 0
|
|
8035
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}
|
|
7999
8036
|
*/
|
|
8000
8037
|
get: function () {
|
|
8001
8038
|
return this._resizeDebounce;
|
|
@@ -8011,6 +8048,7 @@ version: 4.10.4
|
|
|
8011
8048
|
* 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.
|
|
8012
8049
|
* @type {number}
|
|
8013
8050
|
* @default 100
|
|
8051
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}
|
|
8014
8052
|
*/
|
|
8015
8053
|
get: function () {
|
|
8016
8054
|
return this._maxResizeDebounce;
|
|
@@ -8028,6 +8066,7 @@ version: 4.10.4
|
|
|
8028
8066
|
* 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.
|
|
8029
8067
|
* @type {boolean}
|
|
8030
8068
|
* @default false
|
|
8069
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}
|
|
8031
8070
|
*/
|
|
8032
8071
|
get: function () {
|
|
8033
8072
|
return this._useFractionalSize;
|
|
@@ -8894,7 +8933,7 @@ version: 4.10.4
|
|
|
8894
8933
|
*/
|
|
8895
8934
|
|
|
8896
8935
|
|
|
8897
|
-
Flicking.VERSION = "4.10.
|
|
8936
|
+
Flicking.VERSION = "4.10.5";
|
|
8898
8937
|
return Flicking;
|
|
8899
8938
|
}(Component);
|
|
8900
8939
|
|