@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.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
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
|
|
@@ -413,6 +413,17 @@ version: 4.11.3
|
|
|
413
413
|
LTR: "ltr",
|
|
414
414
|
RTL: "rtl"
|
|
415
415
|
};
|
|
416
|
+
/**
|
|
417
|
+
* An object that contains the direction that {@link Flicking} is moving
|
|
418
|
+
* @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
|
|
419
|
+
* @type {object}
|
|
420
|
+
* @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
|
|
421
|
+
* @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
|
|
422
|
+
*/
|
|
423
|
+
var MOVE_DIRECTION = {
|
|
424
|
+
HORIZONTAL: "horizontal",
|
|
425
|
+
VERTICAL: "vertical"
|
|
426
|
+
};
|
|
416
427
|
|
|
417
428
|
var Constants = {
|
|
418
429
|
__proto__: null,
|
|
@@ -423,6 +434,7 @@ version: 4.11.3
|
|
|
423
434
|
CLASS: CLASS,
|
|
424
435
|
CIRCULAR_FALLBACK: CIRCULAR_FALLBACK,
|
|
425
436
|
ORDER: ORDER,
|
|
437
|
+
MOVE_DIRECTION: MOVE_DIRECTION,
|
|
426
438
|
ERROR_CODE: CODE
|
|
427
439
|
};
|
|
428
440
|
|
|
@@ -2147,7 +2159,7 @@ version: 4.11.3
|
|
|
2147
2159
|
});
|
|
2148
2160
|
this._panInput = new Axes.PanInput(flicking.viewport.element, {
|
|
2149
2161
|
inputType: flicking.inputType,
|
|
2150
|
-
threshold:
|
|
2162
|
+
threshold: flicking.dragThreshold,
|
|
2151
2163
|
iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
|
|
2152
2164
|
preventDefaultOnDrag: flicking.preventDefaultOnDrag,
|
|
2153
2165
|
scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
|
|
@@ -6105,40 +6117,42 @@ version: 4.11.3
|
|
|
6105
6117
|
moveType = _v === void 0 ? "snap" : _v,
|
|
6106
6118
|
_w = _b.threshold,
|
|
6107
6119
|
threshold = _w === void 0 ? 40 : _w,
|
|
6108
|
-
_x = _b.
|
|
6109
|
-
|
|
6110
|
-
_y = _b.
|
|
6111
|
-
|
|
6112
|
-
_z = _b.
|
|
6113
|
-
|
|
6114
|
-
_0 = _b.
|
|
6115
|
-
|
|
6116
|
-
_1 = _b.
|
|
6117
|
-
|
|
6118
|
-
_2 = _b.
|
|
6119
|
-
|
|
6120
|
-
_3 = _b.
|
|
6121
|
-
|
|
6122
|
-
_4 = _b.
|
|
6123
|
-
|
|
6124
|
-
_5 = _b.
|
|
6125
|
-
|
|
6126
|
-
_6 = _b.
|
|
6127
|
-
|
|
6128
|
-
_7 = _b.
|
|
6129
|
-
|
|
6130
|
-
_8 = _b.
|
|
6131
|
-
|
|
6132
|
-
_9 = _b.
|
|
6133
|
-
|
|
6134
|
-
_10 = _b.
|
|
6135
|
-
|
|
6136
|
-
_11 = _b.
|
|
6137
|
-
|
|
6138
|
-
_12 = _b.
|
|
6139
|
-
|
|
6140
|
-
_13 = _b.
|
|
6141
|
-
|
|
6120
|
+
_x = _b.dragThreshold,
|
|
6121
|
+
dragThreshold = _x === void 0 ? 1 : _x,
|
|
6122
|
+
_y = _b.interruptable,
|
|
6123
|
+
interruptable = _y === void 0 ? true : _y,
|
|
6124
|
+
_z = _b.bounce,
|
|
6125
|
+
bounce = _z === void 0 ? "20%" : _z,
|
|
6126
|
+
_0 = _b.iOSEdgeSwipeThreshold,
|
|
6127
|
+
iOSEdgeSwipeThreshold = _0 === void 0 ? 30 : _0,
|
|
6128
|
+
_1 = _b.preventClickOnDrag,
|
|
6129
|
+
preventClickOnDrag = _1 === void 0 ? true : _1,
|
|
6130
|
+
_2 = _b.preventDefaultOnDrag,
|
|
6131
|
+
preventDefaultOnDrag = _2 === void 0 ? false : _2,
|
|
6132
|
+
_3 = _b.disableOnInit,
|
|
6133
|
+
disableOnInit = _3 === void 0 ? false : _3,
|
|
6134
|
+
_4 = _b.changeOnHold,
|
|
6135
|
+
changeOnHold = _4 === void 0 ? false : _4,
|
|
6136
|
+
_5 = _b.renderOnlyVisible,
|
|
6137
|
+
renderOnlyVisible = _5 === void 0 ? false : _5,
|
|
6138
|
+
_6 = _b.virtual,
|
|
6139
|
+
virtual = _6 === void 0 ? null : _6,
|
|
6140
|
+
_7 = _b.autoInit,
|
|
6141
|
+
autoInit = _7 === void 0 ? true : _7,
|
|
6142
|
+
_8 = _b.autoResize,
|
|
6143
|
+
autoResize = _8 === void 0 ? true : _8,
|
|
6144
|
+
_9 = _b.useResizeObserver,
|
|
6145
|
+
useResizeObserver = _9 === void 0 ? true : _9,
|
|
6146
|
+
_10 = _b.resizeDebounce,
|
|
6147
|
+
resizeDebounce = _10 === void 0 ? 0 : _10,
|
|
6148
|
+
_11 = _b.maxResizeDebounce,
|
|
6149
|
+
maxResizeDebounce = _11 === void 0 ? 100 : _11,
|
|
6150
|
+
_12 = _b.useFractionalSize,
|
|
6151
|
+
useFractionalSize = _12 === void 0 ? false : _12,
|
|
6152
|
+
_13 = _b.externalRenderer,
|
|
6153
|
+
externalRenderer = _13 === void 0 ? null : _13,
|
|
6154
|
+
_14 = _b.renderExternal,
|
|
6155
|
+
renderExternal = _14 === void 0 ? null : _14;
|
|
6142
6156
|
var _this = _super.call(this) || this;
|
|
6143
6157
|
// Internal states
|
|
6144
6158
|
_this._initialized = false;
|
|
@@ -6164,6 +6178,7 @@ version: 4.11.3
|
|
|
6164
6178
|
_this._inputType = inputType;
|
|
6165
6179
|
_this._moveType = moveType;
|
|
6166
6180
|
_this._threshold = threshold;
|
|
6181
|
+
_this._dragThreshold = dragThreshold;
|
|
6167
6182
|
_this._interruptable = interruptable;
|
|
6168
6183
|
_this._bounce = bounce;
|
|
6169
6184
|
_this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;
|
|
@@ -6478,7 +6493,7 @@ version: 4.11.3
|
|
|
6478
6493
|
Object.defineProperty(__proto, "defaultIndex", {
|
|
6479
6494
|
/**
|
|
6480
6495
|
* Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer
|
|
6481
|
-
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는
|
|
6496
|
+
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다.
|
|
6482
6497
|
* @type {number}
|
|
6483
6498
|
* @default 0
|
|
6484
6499
|
* @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}
|
|
@@ -6843,7 +6858,7 @@ version: 4.11.3
|
|
|
6843
6858
|
Object.defineProperty(__proto, "threshold", {
|
|
6844
6859
|
/**
|
|
6845
6860
|
* Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.
|
|
6846
|
-
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이
|
|
6861
|
+
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능합니다.
|
|
6847
6862
|
* @type {number}
|
|
6848
6863
|
* @default 40
|
|
6849
6864
|
* @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}
|
|
@@ -6857,6 +6872,27 @@ version: 4.11.3
|
|
|
6857
6872
|
enumerable: false,
|
|
6858
6873
|
configurable: true
|
|
6859
6874
|
});
|
|
6875
|
+
Object.defineProperty(__proto, "dragThreshold", {
|
|
6876
|
+
/**
|
|
6877
|
+
* Minimal distance of user input before recognizing (unit: px). It should be dragged above the dragThreshold to move the panel.
|
|
6878
|
+
* @ko 사용자의 입력을 인식하기 위한 최소한의 거리 (단위: px). 주어진 값 이상으로 스크롤해야만 패널이 움직입니다.
|
|
6879
|
+
* @type {number}
|
|
6880
|
+
* @default 1
|
|
6881
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#dragThreshold dragThreshold ( Options )}
|
|
6882
|
+
*/
|
|
6883
|
+
get: function () {
|
|
6884
|
+
return this._dragThreshold;
|
|
6885
|
+
},
|
|
6886
|
+
set: function (val) {
|
|
6887
|
+
this._dragThreshold = val;
|
|
6888
|
+
var panInput = this._control.controller.panInput;
|
|
6889
|
+
if (panInput) {
|
|
6890
|
+
panInput.options.threshold = val;
|
|
6891
|
+
}
|
|
6892
|
+
},
|
|
6893
|
+
enumerable: false,
|
|
6894
|
+
configurable: true
|
|
6895
|
+
});
|
|
6860
6896
|
Object.defineProperty(__proto, "interruptable", {
|
|
6861
6897
|
/**
|
|
6862
6898
|
* Set animation to be interruptable by click/touch.
|
|
@@ -7931,10 +7967,189 @@ version: 4.11.3
|
|
|
7931
7967
|
* Flicking.VERSION; // ex) 4.0.0
|
|
7932
7968
|
* ```
|
|
7933
7969
|
*/
|
|
7934
|
-
Flicking.VERSION = "4.
|
|
7970
|
+
Flicking.VERSION = "4.12.0-beta.1";
|
|
7935
7971
|
return Flicking;
|
|
7936
7972
|
}(Component);
|
|
7937
7973
|
|
|
7974
|
+
/*
|
|
7975
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
7976
|
+
* egjs projects are licensed under the MIT license
|
|
7977
|
+
*/
|
|
7978
|
+
/**
|
|
7979
|
+
* @extends Component
|
|
7980
|
+
* @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
|
|
7981
|
+
* @requires {@link https://github.com/naver/egjs-component|@egjs/component}
|
|
7982
|
+
* @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
|
|
7983
|
+
*/
|
|
7984
|
+
var CrossFlicking = /*#__PURE__*/function (_super) {
|
|
7985
|
+
__extends(CrossFlicking, _super);
|
|
7986
|
+
// Options Setter
|
|
7987
|
+
// UI / LAYOUT
|
|
7988
|
+
// public set align(val: FlickingOptions["align"]) {
|
|
7989
|
+
// this._align = val;
|
|
7990
|
+
// }
|
|
7991
|
+
function CrossFlicking(root, _a) {
|
|
7992
|
+
var _b = (_a === void 0 ? {} : _a).verticalOptions,
|
|
7993
|
+
verticalOptions = _b === void 0 ? undefined : _b;
|
|
7994
|
+
var _this = _super.call(this, root) || this;
|
|
7995
|
+
_this._onHorizontalHoldStart = function () {
|
|
7996
|
+
_this.dragThreshold = 10;
|
|
7997
|
+
_this._moveDirection = null;
|
|
7998
|
+
};
|
|
7999
|
+
_this._onHorizontalMove = function (e) {
|
|
8000
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
8001
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
8002
|
+
child.dragThreshold = Infinity;
|
|
8003
|
+
});
|
|
8004
|
+
_this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
|
|
8005
|
+
}
|
|
8006
|
+
};
|
|
8007
|
+
_this._onHorizontalMoveEnd = function (e) {
|
|
8008
|
+
var visiblePanels = _this.visiblePanels;
|
|
8009
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
8010
|
+
child.dragThreshold = 10;
|
|
8011
|
+
});
|
|
8012
|
+
_this._moveDirection = null;
|
|
8013
|
+
if (visiblePanels.length > 1) {
|
|
8014
|
+
_this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
|
|
8015
|
+
} else {
|
|
8016
|
+
_this._nextIndex = visiblePanels[0].index;
|
|
8017
|
+
}
|
|
8018
|
+
_this._verticalFlicking.forEach(function (child, i) {
|
|
8019
|
+
if (_this._nextIndex !== i) {
|
|
8020
|
+
var _a = _this._verticalState[i],
|
|
8021
|
+
start = _a.start,
|
|
8022
|
+
end = _a.end;
|
|
8023
|
+
if (child.index < start) {
|
|
8024
|
+
child.stopAnimation();
|
|
8025
|
+
void child.moveTo(start, 0);
|
|
8026
|
+
} else if (child.index > end) {
|
|
8027
|
+
child.stopAnimation();
|
|
8028
|
+
void child.moveTo(end, 0);
|
|
8029
|
+
}
|
|
8030
|
+
}
|
|
8031
|
+
});
|
|
8032
|
+
if (e.isTrusted) {
|
|
8033
|
+
_this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
|
|
8034
|
+
}
|
|
8035
|
+
};
|
|
8036
|
+
_this._onVerticalHoldStart = function () {
|
|
8037
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
8038
|
+
child.dragThreshold = 10;
|
|
8039
|
+
});
|
|
8040
|
+
_this._moveDirection = null;
|
|
8041
|
+
};
|
|
8042
|
+
_this._onVerticalMove = function (e) {
|
|
8043
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
8044
|
+
_this.dragThreshold = Infinity;
|
|
8045
|
+
_this._moveDirection = MOVE_DIRECTION.VERTICAL;
|
|
8046
|
+
}
|
|
8047
|
+
};
|
|
8048
|
+
_this._onVerticalMoveEnd = function () {
|
|
8049
|
+
_this.dragThreshold = 10;
|
|
8050
|
+
_this._moveDirection = null;
|
|
8051
|
+
};
|
|
8052
|
+
_this._onVerticalChanged = function (e) {
|
|
8053
|
+
// this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
|
|
8054
|
+
// 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
|
|
8055
|
+
if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
|
|
8056
|
+
_this._syncToCategory(e.index, _this.index);
|
|
8057
|
+
}
|
|
8058
|
+
};
|
|
8059
|
+
// Internal states
|
|
8060
|
+
_this._verticalState = [];
|
|
8061
|
+
_this._moveDirection = null;
|
|
8062
|
+
_this._nextIndex = 0;
|
|
8063
|
+
// Bind options
|
|
8064
|
+
_this._verticalOptions = verticalOptions;
|
|
8065
|
+
return _this;
|
|
8066
|
+
// Create core components
|
|
8067
|
+
// this._viewport = new Viewport(this, getElement(root));
|
|
8068
|
+
}
|
|
8069
|
+
var __proto = CrossFlicking.prototype;
|
|
8070
|
+
Object.defineProperty(__proto, "verticalOptions", {
|
|
8071
|
+
// Components
|
|
8072
|
+
/**
|
|
8073
|
+
* Change active panel index on mouse/touch hold while animating.
|
|
8074
|
+
* `index` of the `willChange`/`willRestore` event will be used as new index.
|
|
8075
|
+
* @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
|
|
8076
|
+
* `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
|
|
8077
|
+
* @type {FlickingOptions}
|
|
8078
|
+
* @default undefined
|
|
8079
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
|
|
8080
|
+
*/
|
|
8081
|
+
get: function () {
|
|
8082
|
+
return this._verticalOptions;
|
|
8083
|
+
},
|
|
8084
|
+
enumerable: false,
|
|
8085
|
+
configurable: true
|
|
8086
|
+
});
|
|
8087
|
+
/**
|
|
8088
|
+
* Initialize Flicking and move to the default index
|
|
8089
|
+
* This is automatically called on Flicking's constructor when `autoInit` is true(default)
|
|
8090
|
+
* @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
|
|
8091
|
+
* 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
|
|
8092
|
+
* @fires Flicking#ready
|
|
8093
|
+
* @return {Promise<void>}
|
|
8094
|
+
*/
|
|
8095
|
+
__proto.init = function () {
|
|
8096
|
+
var _this = this;
|
|
8097
|
+
return _super.prototype.init.call(this).then(function () {
|
|
8098
|
+
// data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
|
|
8099
|
+
// camera.children들에 대해 갯수 세기
|
|
8100
|
+
var verticalPanels = "";
|
|
8101
|
+
_this._verticalState = _this.camera.children.reduce(function (state, child) {
|
|
8102
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
8103
|
+
verticalPanels += child.children[0].innerHTML;
|
|
8104
|
+
return __spread(state, [{
|
|
8105
|
+
start: start,
|
|
8106
|
+
end: start + child.children[0].children.length - 1,
|
|
8107
|
+
element: child
|
|
8108
|
+
}]);
|
|
8109
|
+
}, []);
|
|
8110
|
+
_this.camera.children.forEach(function (child) {
|
|
8111
|
+
child.children[0].innerHTML = verticalPanels;
|
|
8112
|
+
});
|
|
8113
|
+
_this._verticalFlicking = _this.camera.children.map(function (child, i) {
|
|
8114
|
+
return new Flicking(child, __assign(__assign({}, _this.verticalOptions), {
|
|
8115
|
+
horizontal: false,
|
|
8116
|
+
panelsPerView: 1,
|
|
8117
|
+
defaultIndex: _this._verticalState[i].start
|
|
8118
|
+
}));
|
|
8119
|
+
});
|
|
8120
|
+
_this.on(EVENTS.HOLD_START, _this._onHorizontalHoldStart);
|
|
8121
|
+
_this.on(EVENTS.MOVE, _this._onHorizontalMove);
|
|
8122
|
+
_this.on(EVENTS.MOVE_END, _this._onHorizontalMoveEnd);
|
|
8123
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
8124
|
+
child.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
|
|
8125
|
+
child.on(EVENTS.MOVE, _this._onVerticalMove);
|
|
8126
|
+
child.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
|
|
8127
|
+
child.on(EVENTS.CHANGED, _this._onVerticalChanged);
|
|
8128
|
+
});
|
|
8129
|
+
});
|
|
8130
|
+
};
|
|
8131
|
+
__proto._syncToCategory = function (index, outerIndex) {
|
|
8132
|
+
var _this = this;
|
|
8133
|
+
this.stopAnimation();
|
|
8134
|
+
this._verticalFlicking.forEach(function (child, i) {
|
|
8135
|
+
var _a = _this._verticalState[i],
|
|
8136
|
+
start = _a.start,
|
|
8137
|
+
end = _a.end;
|
|
8138
|
+
if (start <= index && end >= index && outerIndex !== i) {
|
|
8139
|
+
child.stopAnimation();
|
|
8140
|
+
void child.moveTo(index, 0);
|
|
8141
|
+
void _this.moveTo(i, 0);
|
|
8142
|
+
}
|
|
8143
|
+
});
|
|
8144
|
+
};
|
|
8145
|
+
return CrossFlicking;
|
|
8146
|
+
}(Flicking);
|
|
8147
|
+
|
|
8148
|
+
var CrossFlicking$1 = {
|
|
8149
|
+
__proto__: null,
|
|
8150
|
+
CrossFlicking: CrossFlicking
|
|
8151
|
+
};
|
|
8152
|
+
|
|
7938
8153
|
/*
|
|
7939
8154
|
* Copyright (c) 2015 NAVER Corp.
|
|
7940
8155
|
* egjs projects are licensed under the MIT license
|
|
@@ -8180,6 +8395,7 @@ version: 4.11.3
|
|
|
8180
8395
|
merge(Flicking, Constants);
|
|
8181
8396
|
merge(Flicking, CFC);
|
|
8182
8397
|
merge(Flicking, Utils);
|
|
8398
|
+
merge(Flicking, CrossFlicking$1);
|
|
8183
8399
|
|
|
8184
8400
|
return Flicking;
|
|
8185
8401
|
|