@egjs/flicking 4.11.3 → 4.12.0-beta.1
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/CrossFlicking.d.ts +29 -0
- package/declaration/Flicking.d.ts +244 -240
- package/declaration/camera/Camera.d.ts +89 -89
- package/declaration/camera/index.d.ts +4 -4
- package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
- package/declaration/camera/mode/CameraMode.d.ts +20 -20
- package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
- package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
- package/declaration/camera/mode/index.d.ts +6 -6
- package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
- package/declaration/cfc/getRenderingPanels.d.ts +4 -4
- package/declaration/cfc/index.d.ts +5 -5
- package/declaration/cfc/sync.d.ts +4 -4
- package/declaration/cfc/withFlickingMethods.d.ts +2 -2
- package/declaration/const/axes.d.ts +8 -8
- package/declaration/const/error.d.ts +34 -34
- package/declaration/const/external.d.ts +52 -48
- package/declaration/control/AxesController.d.ts +44 -44
- package/declaration/control/Control.d.ts +45 -45
- package/declaration/control/FreeControl.d.ts +14 -14
- package/declaration/control/SnapControl.d.ts +16 -16
- package/declaration/control/StateMachine.d.ts +14 -14
- package/declaration/control/StrictControl.d.ts +20 -20
- package/declaration/control/index.d.ts +14 -14
- package/declaration/control/states/AnimatingState.d.ts +9 -9
- package/declaration/control/states/DisabledState.d.ts +9 -9
- package/declaration/control/states/DraggingState.d.ts +8 -8
- package/declaration/control/states/HoldingState.d.ts +10 -10
- package/declaration/control/states/IdleState.d.ts +9 -9
- package/declaration/control/states/State.d.ts +47 -47
- package/declaration/core/AnchorPoint.d.ts +15 -15
- package/declaration/core/AutoResizer.d.ts +16 -16
- package/declaration/core/FlickingError.d.ts +5 -5
- package/declaration/core/ResizeWatcher.d.ts +33 -33
- package/declaration/core/Viewport.d.ts +25 -25
- package/declaration/core/VirtualManager.d.ts +37 -37
- package/declaration/core/index.d.ts +6 -6
- package/declaration/core/panel/Panel.d.ts +89 -89
- package/declaration/core/panel/VirtualPanel.d.ts +19 -19
- package/declaration/core/panel/index.d.ts +5 -5
- package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
- package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
- package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
- package/declaration/core/panel/provider/index.d.ts +5 -5
- package/declaration/index.cjs.d.ts +3 -3
- package/declaration/index.d.ts +14 -13
- package/declaration/index.umd.d.ts +2 -2
- package/declaration/renderer/ExternalRenderer.d.ts +7 -7
- package/declaration/renderer/Renderer.d.ts +59 -59
- package/declaration/renderer/VanillaRenderer.d.ts +10 -10
- package/declaration/renderer/index.d.ts +6 -6
- package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
- package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
- package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
- package/declaration/renderer/strategy/index.d.ts +5 -5
- package/declaration/type/event.d.ts +88 -88
- package/declaration/type/external.d.ts +31 -31
- package/declaration/type/internal.d.ts +13 -13
- package/declaration/utils.d.ts +45 -45
- package/dist/flicking.cjs.js +252 -39
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +249 -40
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +255 -39
- 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 +255 -39
- 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/CrossFlicking.ts +252 -0
- package/src/Flicking.ts +24 -2
- package/src/const/external.ts +12 -0
- package/src/control/AxesController.ts +1 -1
- package/src/index.ts +2 -0
- package/src/index.umd.ts +2 -0
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.12.0-beta.1
|
|
8
8
|
*/
|
|
9
9
|
import Component, { ComponentEvent } from '@egjs/component';
|
|
10
10
|
import Axes, { PanInput } from '@egjs/axes';
|
|
@@ -411,6 +411,17 @@ var ORDER = {
|
|
|
411
411
|
LTR: "ltr",
|
|
412
412
|
RTL: "rtl"
|
|
413
413
|
};
|
|
414
|
+
/**
|
|
415
|
+
* An object that contains the direction that {@link Flicking} is moving
|
|
416
|
+
* @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
|
|
417
|
+
* @type {object}
|
|
418
|
+
* @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
|
|
419
|
+
* @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
|
|
420
|
+
*/
|
|
421
|
+
var MOVE_DIRECTION = {
|
|
422
|
+
HORIZONTAL: "horizontal",
|
|
423
|
+
VERTICAL: "vertical"
|
|
424
|
+
};
|
|
414
425
|
|
|
415
426
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
416
427
|
var merge = function (target) {
|
|
@@ -2100,7 +2111,7 @@ var AxesController = /*#__PURE__*/function () {
|
|
|
2100
2111
|
});
|
|
2101
2112
|
this._panInput = new PanInput(flicking.viewport.element, {
|
|
2102
2113
|
inputType: flicking.inputType,
|
|
2103
|
-
threshold:
|
|
2114
|
+
threshold: flicking.dragThreshold,
|
|
2104
2115
|
iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
|
|
2105
2116
|
preventDefaultOnDrag: flicking.preventDefaultOnDrag,
|
|
2106
2117
|
scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
|
|
@@ -6010,40 +6021,42 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
6010
6021
|
moveType = _v === void 0 ? "snap" : _v,
|
|
6011
6022
|
_w = _b.threshold,
|
|
6012
6023
|
threshold = _w === void 0 ? 40 : _w,
|
|
6013
|
-
_x = _b.
|
|
6014
|
-
|
|
6015
|
-
_y = _b.
|
|
6016
|
-
|
|
6017
|
-
_z = _b.
|
|
6018
|
-
|
|
6019
|
-
_0 = _b.
|
|
6020
|
-
|
|
6021
|
-
_1 = _b.
|
|
6022
|
-
|
|
6023
|
-
_2 = _b.
|
|
6024
|
-
|
|
6025
|
-
_3 = _b.
|
|
6026
|
-
|
|
6027
|
-
_4 = _b.
|
|
6028
|
-
|
|
6029
|
-
_5 = _b.
|
|
6030
|
-
|
|
6031
|
-
_6 = _b.
|
|
6032
|
-
|
|
6033
|
-
_7 = _b.
|
|
6034
|
-
|
|
6035
|
-
_8 = _b.
|
|
6036
|
-
|
|
6037
|
-
_9 = _b.
|
|
6038
|
-
|
|
6039
|
-
_10 = _b.
|
|
6040
|
-
|
|
6041
|
-
_11 = _b.
|
|
6042
|
-
|
|
6043
|
-
_12 = _b.
|
|
6044
|
-
|
|
6045
|
-
_13 = _b.
|
|
6046
|
-
|
|
6024
|
+
_x = _b.dragThreshold,
|
|
6025
|
+
dragThreshold = _x === void 0 ? 1 : _x,
|
|
6026
|
+
_y = _b.interruptable,
|
|
6027
|
+
interruptable = _y === void 0 ? true : _y,
|
|
6028
|
+
_z = _b.bounce,
|
|
6029
|
+
bounce = _z === void 0 ? "20%" : _z,
|
|
6030
|
+
_0 = _b.iOSEdgeSwipeThreshold,
|
|
6031
|
+
iOSEdgeSwipeThreshold = _0 === void 0 ? 30 : _0,
|
|
6032
|
+
_1 = _b.preventClickOnDrag,
|
|
6033
|
+
preventClickOnDrag = _1 === void 0 ? true : _1,
|
|
6034
|
+
_2 = _b.preventDefaultOnDrag,
|
|
6035
|
+
preventDefaultOnDrag = _2 === void 0 ? false : _2,
|
|
6036
|
+
_3 = _b.disableOnInit,
|
|
6037
|
+
disableOnInit = _3 === void 0 ? false : _3,
|
|
6038
|
+
_4 = _b.changeOnHold,
|
|
6039
|
+
changeOnHold = _4 === void 0 ? false : _4,
|
|
6040
|
+
_5 = _b.renderOnlyVisible,
|
|
6041
|
+
renderOnlyVisible = _5 === void 0 ? false : _5,
|
|
6042
|
+
_6 = _b.virtual,
|
|
6043
|
+
virtual = _6 === void 0 ? null : _6,
|
|
6044
|
+
_7 = _b.autoInit,
|
|
6045
|
+
autoInit = _7 === void 0 ? true : _7,
|
|
6046
|
+
_8 = _b.autoResize,
|
|
6047
|
+
autoResize = _8 === void 0 ? true : _8,
|
|
6048
|
+
_9 = _b.useResizeObserver,
|
|
6049
|
+
useResizeObserver = _9 === void 0 ? true : _9,
|
|
6050
|
+
_10 = _b.resizeDebounce,
|
|
6051
|
+
resizeDebounce = _10 === void 0 ? 0 : _10,
|
|
6052
|
+
_11 = _b.maxResizeDebounce,
|
|
6053
|
+
maxResizeDebounce = _11 === void 0 ? 100 : _11,
|
|
6054
|
+
_12 = _b.useFractionalSize,
|
|
6055
|
+
useFractionalSize = _12 === void 0 ? false : _12,
|
|
6056
|
+
_13 = _b.externalRenderer,
|
|
6057
|
+
externalRenderer = _13 === void 0 ? null : _13,
|
|
6058
|
+
_14 = _b.renderExternal,
|
|
6059
|
+
renderExternal = _14 === void 0 ? null : _14;
|
|
6047
6060
|
var _this = _super.call(this) || this;
|
|
6048
6061
|
// Internal states
|
|
6049
6062
|
_this._initialized = false;
|
|
@@ -6069,6 +6082,7 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
6069
6082
|
_this._inputType = inputType;
|
|
6070
6083
|
_this._moveType = moveType;
|
|
6071
6084
|
_this._threshold = threshold;
|
|
6085
|
+
_this._dragThreshold = dragThreshold;
|
|
6072
6086
|
_this._interruptable = interruptable;
|
|
6073
6087
|
_this._bounce = bounce;
|
|
6074
6088
|
_this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;
|
|
@@ -6383,7 +6397,7 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
6383
6397
|
Object.defineProperty(__proto, "defaultIndex", {
|
|
6384
6398
|
/**
|
|
6385
6399
|
* Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer
|
|
6386
|
-
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는
|
|
6400
|
+
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다.
|
|
6387
6401
|
* @type {number}
|
|
6388
6402
|
* @default 0
|
|
6389
6403
|
* @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}
|
|
@@ -6748,7 +6762,7 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
6748
6762
|
Object.defineProperty(__proto, "threshold", {
|
|
6749
6763
|
/**
|
|
6750
6764
|
* Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.
|
|
6751
|
-
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이
|
|
6765
|
+
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능합니다.
|
|
6752
6766
|
* @type {number}
|
|
6753
6767
|
* @default 40
|
|
6754
6768
|
* @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}
|
|
@@ -6762,6 +6776,27 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
6762
6776
|
enumerable: false,
|
|
6763
6777
|
configurable: true
|
|
6764
6778
|
});
|
|
6779
|
+
Object.defineProperty(__proto, "dragThreshold", {
|
|
6780
|
+
/**
|
|
6781
|
+
* Minimal distance of user input before recognizing (unit: px). It should be dragged above the dragThreshold to move the panel.
|
|
6782
|
+
* @ko 사용자의 입력을 인식하기 위한 최소한의 거리 (단위: px). 주어진 값 이상으로 스크롤해야만 패널이 움직입니다.
|
|
6783
|
+
* @type {number}
|
|
6784
|
+
* @default 1
|
|
6785
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#dragThreshold dragThreshold ( Options )}
|
|
6786
|
+
*/
|
|
6787
|
+
get: function () {
|
|
6788
|
+
return this._dragThreshold;
|
|
6789
|
+
},
|
|
6790
|
+
set: function (val) {
|
|
6791
|
+
this._dragThreshold = val;
|
|
6792
|
+
var panInput = this._control.controller.panInput;
|
|
6793
|
+
if (panInput) {
|
|
6794
|
+
panInput.options.threshold = val;
|
|
6795
|
+
}
|
|
6796
|
+
},
|
|
6797
|
+
enumerable: false,
|
|
6798
|
+
configurable: true
|
|
6799
|
+
});
|
|
6765
6800
|
Object.defineProperty(__proto, "interruptable", {
|
|
6766
6801
|
/**
|
|
6767
6802
|
* Set animation to be interruptable by click/touch.
|
|
@@ -7836,10 +7871,184 @@ var Flicking = /*#__PURE__*/function (_super) {
|
|
|
7836
7871
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7837
7872
|
* ```
|
|
7838
7873
|
*/
|
|
7839
|
-
Flicking.VERSION = "4.
|
|
7874
|
+
Flicking.VERSION = "4.12.0-beta.1";
|
|
7840
7875
|
return Flicking;
|
|
7841
7876
|
}(Component);
|
|
7842
7877
|
|
|
7878
|
+
/*
|
|
7879
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
7880
|
+
* egjs projects are licensed under the MIT license
|
|
7881
|
+
*/
|
|
7882
|
+
/**
|
|
7883
|
+
* @extends Component
|
|
7884
|
+
* @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
|
|
7885
|
+
* @requires {@link https://github.com/naver/egjs-component|@egjs/component}
|
|
7886
|
+
* @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
|
|
7887
|
+
*/
|
|
7888
|
+
var CrossFlicking = /*#__PURE__*/function (_super) {
|
|
7889
|
+
__extends(CrossFlicking, _super);
|
|
7890
|
+
// Options Setter
|
|
7891
|
+
// UI / LAYOUT
|
|
7892
|
+
// public set align(val: FlickingOptions["align"]) {
|
|
7893
|
+
// this._align = val;
|
|
7894
|
+
// }
|
|
7895
|
+
function CrossFlicking(root, _a) {
|
|
7896
|
+
var _b = (_a === void 0 ? {} : _a).verticalOptions,
|
|
7897
|
+
verticalOptions = _b === void 0 ? undefined : _b;
|
|
7898
|
+
var _this = _super.call(this, root) || this;
|
|
7899
|
+
_this._onHorizontalHoldStart = function () {
|
|
7900
|
+
_this.dragThreshold = 10;
|
|
7901
|
+
_this._moveDirection = null;
|
|
7902
|
+
};
|
|
7903
|
+
_this._onHorizontalMove = function (e) {
|
|
7904
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
7905
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
7906
|
+
child.dragThreshold = Infinity;
|
|
7907
|
+
});
|
|
7908
|
+
_this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
|
|
7909
|
+
}
|
|
7910
|
+
};
|
|
7911
|
+
_this._onHorizontalMoveEnd = function (e) {
|
|
7912
|
+
var visiblePanels = _this.visiblePanels;
|
|
7913
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
7914
|
+
child.dragThreshold = 10;
|
|
7915
|
+
});
|
|
7916
|
+
_this._moveDirection = null;
|
|
7917
|
+
if (visiblePanels.length > 1) {
|
|
7918
|
+
_this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
|
|
7919
|
+
} else {
|
|
7920
|
+
_this._nextIndex = visiblePanels[0].index;
|
|
7921
|
+
}
|
|
7922
|
+
_this._verticalFlicking.forEach(function (child, i) {
|
|
7923
|
+
if (_this._nextIndex !== i) {
|
|
7924
|
+
var _a = _this._verticalState[i],
|
|
7925
|
+
start = _a.start,
|
|
7926
|
+
end = _a.end;
|
|
7927
|
+
if (child.index < start) {
|
|
7928
|
+
child.stopAnimation();
|
|
7929
|
+
void child.moveTo(start, 0);
|
|
7930
|
+
} else if (child.index > end) {
|
|
7931
|
+
child.stopAnimation();
|
|
7932
|
+
void child.moveTo(end, 0);
|
|
7933
|
+
}
|
|
7934
|
+
}
|
|
7935
|
+
});
|
|
7936
|
+
if (e.isTrusted) {
|
|
7937
|
+
_this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
|
|
7938
|
+
}
|
|
7939
|
+
};
|
|
7940
|
+
_this._onVerticalHoldStart = function () {
|
|
7941
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
7942
|
+
child.dragThreshold = 10;
|
|
7943
|
+
});
|
|
7944
|
+
_this._moveDirection = null;
|
|
7945
|
+
};
|
|
7946
|
+
_this._onVerticalMove = function (e) {
|
|
7947
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
7948
|
+
_this.dragThreshold = Infinity;
|
|
7949
|
+
_this._moveDirection = MOVE_DIRECTION.VERTICAL;
|
|
7950
|
+
}
|
|
7951
|
+
};
|
|
7952
|
+
_this._onVerticalMoveEnd = function () {
|
|
7953
|
+
_this.dragThreshold = 10;
|
|
7954
|
+
_this._moveDirection = null;
|
|
7955
|
+
};
|
|
7956
|
+
_this._onVerticalChanged = function (e) {
|
|
7957
|
+
// this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
|
|
7958
|
+
// 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
|
|
7959
|
+
if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
|
|
7960
|
+
_this._syncToCategory(e.index, _this.index);
|
|
7961
|
+
}
|
|
7962
|
+
};
|
|
7963
|
+
// Internal states
|
|
7964
|
+
_this._verticalState = [];
|
|
7965
|
+
_this._moveDirection = null;
|
|
7966
|
+
_this._nextIndex = 0;
|
|
7967
|
+
// Bind options
|
|
7968
|
+
_this._verticalOptions = verticalOptions;
|
|
7969
|
+
return _this;
|
|
7970
|
+
// Create core components
|
|
7971
|
+
// this._viewport = new Viewport(this, getElement(root));
|
|
7972
|
+
}
|
|
7973
|
+
var __proto = CrossFlicking.prototype;
|
|
7974
|
+
Object.defineProperty(__proto, "verticalOptions", {
|
|
7975
|
+
// Components
|
|
7976
|
+
/**
|
|
7977
|
+
* Change active panel index on mouse/touch hold while animating.
|
|
7978
|
+
* `index` of the `willChange`/`willRestore` event will be used as new index.
|
|
7979
|
+
* @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
|
|
7980
|
+
* `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
|
|
7981
|
+
* @type {FlickingOptions}
|
|
7982
|
+
* @default undefined
|
|
7983
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
|
|
7984
|
+
*/
|
|
7985
|
+
get: function () {
|
|
7986
|
+
return this._verticalOptions;
|
|
7987
|
+
},
|
|
7988
|
+
enumerable: false,
|
|
7989
|
+
configurable: true
|
|
7990
|
+
});
|
|
7991
|
+
/**
|
|
7992
|
+
* Initialize Flicking and move to the default index
|
|
7993
|
+
* This is automatically called on Flicking's constructor when `autoInit` is true(default)
|
|
7994
|
+
* @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
|
|
7995
|
+
* 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
|
|
7996
|
+
* @fires Flicking#ready
|
|
7997
|
+
* @return {Promise<void>}
|
|
7998
|
+
*/
|
|
7999
|
+
__proto.init = function () {
|
|
8000
|
+
var _this = this;
|
|
8001
|
+
return _super.prototype.init.call(this).then(function () {
|
|
8002
|
+
// data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
|
|
8003
|
+
// camera.children들에 대해 갯수 세기
|
|
8004
|
+
var verticalPanels = "";
|
|
8005
|
+
_this._verticalState = _this.camera.children.reduce(function (state, child) {
|
|
8006
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
8007
|
+
verticalPanels += child.children[0].innerHTML;
|
|
8008
|
+
return __spread(state, [{
|
|
8009
|
+
start: start,
|
|
8010
|
+
end: start + child.children[0].children.length - 1,
|
|
8011
|
+
element: child
|
|
8012
|
+
}]);
|
|
8013
|
+
}, []);
|
|
8014
|
+
_this.camera.children.forEach(function (child) {
|
|
8015
|
+
child.children[0].innerHTML = verticalPanels;
|
|
8016
|
+
});
|
|
8017
|
+
_this._verticalFlicking = _this.camera.children.map(function (child, i) {
|
|
8018
|
+
return new Flicking(child, __assign(__assign({}, _this.verticalOptions), {
|
|
8019
|
+
horizontal: false,
|
|
8020
|
+
panelsPerView: 1,
|
|
8021
|
+
defaultIndex: _this._verticalState[i].start
|
|
8022
|
+
}));
|
|
8023
|
+
});
|
|
8024
|
+
_this.on(EVENTS.HOLD_START, _this._onHorizontalHoldStart);
|
|
8025
|
+
_this.on(EVENTS.MOVE, _this._onHorizontalMove);
|
|
8026
|
+
_this.on(EVENTS.MOVE_END, _this._onHorizontalMoveEnd);
|
|
8027
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
8028
|
+
child.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
|
|
8029
|
+
child.on(EVENTS.MOVE, _this._onVerticalMove);
|
|
8030
|
+
child.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
|
|
8031
|
+
child.on(EVENTS.CHANGED, _this._onVerticalChanged);
|
|
8032
|
+
});
|
|
8033
|
+
});
|
|
8034
|
+
};
|
|
8035
|
+
__proto._syncToCategory = function (index, outerIndex) {
|
|
8036
|
+
var _this = this;
|
|
8037
|
+
this.stopAnimation();
|
|
8038
|
+
this._verticalFlicking.forEach(function (child, i) {
|
|
8039
|
+
var _a = _this._verticalState[i],
|
|
8040
|
+
start = _a.start,
|
|
8041
|
+
end = _a.end;
|
|
8042
|
+
if (start <= index && end >= index && outerIndex !== i) {
|
|
8043
|
+
child.stopAnimation();
|
|
8044
|
+
void child.moveTo(index, 0);
|
|
8045
|
+
void _this.moveTo(i, 0);
|
|
8046
|
+
}
|
|
8047
|
+
});
|
|
8048
|
+
};
|
|
8049
|
+
return CrossFlicking;
|
|
8050
|
+
}(Flicking);
|
|
8051
|
+
|
|
7843
8052
|
/**
|
|
7844
8053
|
* Decorator that makes the method of flicking available in the framework.
|
|
7845
8054
|
* @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.
|
|
@@ -8054,5 +8263,5 @@ var parseAlign = function (alignVal) {
|
|
|
8054
8263
|
* egjs projects are licensed under the MIT license
|
|
8055
8264
|
*/
|
|
8056
8265
|
|
|
8057
|
-
export { ALIGN, AnchorPoint, AnimatingState, AxesController, BoundCameraMode, CIRCULAR_FALLBACK, CLASS, Camera, CircularCameraMode, Control, DIRECTION, DisabledState, DraggingState, CODE as ERROR_CODE, EVENTS, ExternalRenderer, FlickingError, FreeControl, HoldingState, IdleState, LinearCameraMode, MOVE_TYPE, NormalRenderingStrategy, ORDER, Panel, Renderer, SnapControl, State, StateMachine, StrictControl, VanillaElementProvider, VanillaRenderer, Viewport, VirtualElementProvider, VirtualManager, VirtualPanel, VirtualRenderingStrategy, checkExistence, circulateIndex, circulatePosition, clamp, Flicking as default, find, findIndex, findRight, getDefaultCameraTransform, getDirection, getElement, getElementSize, getFlickingAttached, getMinusCompensatedIndex, getProgress, getRenderingPanels, getStyle, includes, isBetween, isString, merge, parseAlign$1 as parseAlign, parseArithmeticExpression, parseArithmeticSize, parseBounce, parseCSSSizeValue, parseElement, parsePanelAlign, range, setPrototypeOf, setSize, sync, toArray, withFlickingMethods };
|
|
8266
|
+
export { ALIGN, AnchorPoint, AnimatingState, AxesController, BoundCameraMode, CIRCULAR_FALLBACK, CLASS, Camera, CircularCameraMode, Control, CrossFlicking, DIRECTION, DisabledState, DraggingState, CODE as ERROR_CODE, EVENTS, ExternalRenderer, FlickingError, FreeControl, HoldingState, IdleState, LinearCameraMode, MOVE_DIRECTION, MOVE_TYPE, NormalRenderingStrategy, ORDER, Panel, Renderer, SnapControl, State, StateMachine, StrictControl, VanillaElementProvider, VanillaRenderer, Viewport, VirtualElementProvider, VirtualManager, VirtualPanel, VirtualRenderingStrategy, checkExistence, circulateIndex, circulatePosition, clamp, Flicking as default, find, findIndex, findRight, getDefaultCameraTransform, getDirection, getElement, getElementSize, getFlickingAttached, getMinusCompensatedIndex, getProgress, getRenderingPanels, getStyle, includes, isBetween, isString, merge, parseAlign$1 as parseAlign, parseArithmeticExpression, parseArithmeticSize, parseBounce, parseCSSSizeValue, parseElement, parsePanelAlign, range, setPrototypeOf, setSize, sync, toArray, withFlickingMethods };
|
|
8058
8267
|
//# sourceMappingURL=flicking.esm.js.map
|