@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.pkgd.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() :
|
|
@@ -820,6 +820,17 @@ version: 4.11.3
|
|
|
820
820
|
LTR: "ltr",
|
|
821
821
|
RTL: "rtl"
|
|
822
822
|
};
|
|
823
|
+
/**
|
|
824
|
+
* An object that contains the direction that {@link Flicking} is moving
|
|
825
|
+
* @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
|
|
826
|
+
* @type {object}
|
|
827
|
+
* @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
|
|
828
|
+
* @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
|
|
829
|
+
*/
|
|
830
|
+
var MOVE_DIRECTION = {
|
|
831
|
+
HORIZONTAL: "horizontal",
|
|
832
|
+
VERTICAL: "vertical"
|
|
833
|
+
};
|
|
823
834
|
|
|
824
835
|
var Constants = {
|
|
825
836
|
__proto__: null,
|
|
@@ -830,6 +841,7 @@ version: 4.11.3
|
|
|
830
841
|
CLASS: CLASS,
|
|
831
842
|
CIRCULAR_FALLBACK: CIRCULAR_FALLBACK,
|
|
832
843
|
ORDER: ORDER,
|
|
844
|
+
MOVE_DIRECTION: MOVE_DIRECTION,
|
|
833
845
|
ERROR_CODE: CODE
|
|
834
846
|
};
|
|
835
847
|
|
|
@@ -6305,7 +6317,7 @@ version: 4.11.3
|
|
|
6305
6317
|
});
|
|
6306
6318
|
this._panInput = new PanInput(flicking.viewport.element, {
|
|
6307
6319
|
inputType: flicking.inputType,
|
|
6308
|
-
threshold:
|
|
6320
|
+
threshold: flicking.dragThreshold,
|
|
6309
6321
|
iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
|
|
6310
6322
|
preventDefaultOnDrag: flicking.preventDefaultOnDrag,
|
|
6311
6323
|
scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],
|
|
@@ -11133,40 +11145,42 @@ version: 4.11.3
|
|
|
11133
11145
|
moveType = _v === void 0 ? "snap" : _v,
|
|
11134
11146
|
_w = _b.threshold,
|
|
11135
11147
|
threshold = _w === void 0 ? 40 : _w,
|
|
11136
|
-
_x = _b.
|
|
11137
|
-
|
|
11138
|
-
_y = _b.
|
|
11139
|
-
|
|
11140
|
-
_z = _b.
|
|
11141
|
-
|
|
11142
|
-
_0 = _b.
|
|
11143
|
-
|
|
11144
|
-
_1 = _b.
|
|
11145
|
-
|
|
11146
|
-
_2 = _b.
|
|
11147
|
-
|
|
11148
|
-
_3 = _b.
|
|
11149
|
-
|
|
11150
|
-
_4 = _b.
|
|
11151
|
-
|
|
11152
|
-
_5 = _b.
|
|
11153
|
-
|
|
11154
|
-
_6 = _b.
|
|
11155
|
-
|
|
11156
|
-
_7 = _b.
|
|
11157
|
-
|
|
11158
|
-
_8 = _b.
|
|
11159
|
-
|
|
11160
|
-
_9 = _b.
|
|
11161
|
-
|
|
11162
|
-
_10 = _b.
|
|
11163
|
-
|
|
11164
|
-
_11 = _b.
|
|
11165
|
-
|
|
11166
|
-
_12 = _b.
|
|
11167
|
-
|
|
11168
|
-
_13 = _b.
|
|
11169
|
-
|
|
11148
|
+
_x = _b.dragThreshold,
|
|
11149
|
+
dragThreshold = _x === void 0 ? 1 : _x,
|
|
11150
|
+
_y = _b.interruptable,
|
|
11151
|
+
interruptable = _y === void 0 ? true : _y,
|
|
11152
|
+
_z = _b.bounce,
|
|
11153
|
+
bounce = _z === void 0 ? "20%" : _z,
|
|
11154
|
+
_0 = _b.iOSEdgeSwipeThreshold,
|
|
11155
|
+
iOSEdgeSwipeThreshold = _0 === void 0 ? 30 : _0,
|
|
11156
|
+
_1 = _b.preventClickOnDrag,
|
|
11157
|
+
preventClickOnDrag = _1 === void 0 ? true : _1,
|
|
11158
|
+
_2 = _b.preventDefaultOnDrag,
|
|
11159
|
+
preventDefaultOnDrag = _2 === void 0 ? false : _2,
|
|
11160
|
+
_3 = _b.disableOnInit,
|
|
11161
|
+
disableOnInit = _3 === void 0 ? false : _3,
|
|
11162
|
+
_4 = _b.changeOnHold,
|
|
11163
|
+
changeOnHold = _4 === void 0 ? false : _4,
|
|
11164
|
+
_5 = _b.renderOnlyVisible,
|
|
11165
|
+
renderOnlyVisible = _5 === void 0 ? false : _5,
|
|
11166
|
+
_6 = _b.virtual,
|
|
11167
|
+
virtual = _6 === void 0 ? null : _6,
|
|
11168
|
+
_7 = _b.autoInit,
|
|
11169
|
+
autoInit = _7 === void 0 ? true : _7,
|
|
11170
|
+
_8 = _b.autoResize,
|
|
11171
|
+
autoResize = _8 === void 0 ? true : _8,
|
|
11172
|
+
_9 = _b.useResizeObserver,
|
|
11173
|
+
useResizeObserver = _9 === void 0 ? true : _9,
|
|
11174
|
+
_10 = _b.resizeDebounce,
|
|
11175
|
+
resizeDebounce = _10 === void 0 ? 0 : _10,
|
|
11176
|
+
_11 = _b.maxResizeDebounce,
|
|
11177
|
+
maxResizeDebounce = _11 === void 0 ? 100 : _11,
|
|
11178
|
+
_12 = _b.useFractionalSize,
|
|
11179
|
+
useFractionalSize = _12 === void 0 ? false : _12,
|
|
11180
|
+
_13 = _b.externalRenderer,
|
|
11181
|
+
externalRenderer = _13 === void 0 ? null : _13,
|
|
11182
|
+
_14 = _b.renderExternal,
|
|
11183
|
+
renderExternal = _14 === void 0 ? null : _14;
|
|
11170
11184
|
var _this = _super.call(this) || this;
|
|
11171
11185
|
// Internal states
|
|
11172
11186
|
_this._initialized = false;
|
|
@@ -11192,6 +11206,7 @@ version: 4.11.3
|
|
|
11192
11206
|
_this._inputType = inputType;
|
|
11193
11207
|
_this._moveType = moveType;
|
|
11194
11208
|
_this._threshold = threshold;
|
|
11209
|
+
_this._dragThreshold = dragThreshold;
|
|
11195
11210
|
_this._interruptable = interruptable;
|
|
11196
11211
|
_this._bounce = bounce;
|
|
11197
11212
|
_this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;
|
|
@@ -11506,7 +11521,7 @@ version: 4.11.3
|
|
|
11506
11521
|
Object.defineProperty(__proto, "defaultIndex", {
|
|
11507
11522
|
/**
|
|
11508
11523
|
* Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer
|
|
11509
|
-
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는
|
|
11524
|
+
* @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다.
|
|
11510
11525
|
* @type {number}
|
|
11511
11526
|
* @default 0
|
|
11512
11527
|
* @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}
|
|
@@ -11871,7 +11886,7 @@ version: 4.11.3
|
|
|
11871
11886
|
Object.defineProperty(__proto, "threshold", {
|
|
11872
11887
|
/**
|
|
11873
11888
|
* Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.
|
|
11874
|
-
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이
|
|
11889
|
+
* @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능합니다.
|
|
11875
11890
|
* @type {number}
|
|
11876
11891
|
* @default 40
|
|
11877
11892
|
* @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}
|
|
@@ -11885,6 +11900,27 @@ version: 4.11.3
|
|
|
11885
11900
|
enumerable: false,
|
|
11886
11901
|
configurable: true
|
|
11887
11902
|
});
|
|
11903
|
+
Object.defineProperty(__proto, "dragThreshold", {
|
|
11904
|
+
/**
|
|
11905
|
+
* Minimal distance of user input before recognizing (unit: px). It should be dragged above the dragThreshold to move the panel.
|
|
11906
|
+
* @ko 사용자의 입력을 인식하기 위한 최소한의 거리 (단위: px). 주어진 값 이상으로 스크롤해야만 패널이 움직입니다.
|
|
11907
|
+
* @type {number}
|
|
11908
|
+
* @default 1
|
|
11909
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#dragThreshold dragThreshold ( Options )}
|
|
11910
|
+
*/
|
|
11911
|
+
get: function () {
|
|
11912
|
+
return this._dragThreshold;
|
|
11913
|
+
},
|
|
11914
|
+
set: function (val) {
|
|
11915
|
+
this._dragThreshold = val;
|
|
11916
|
+
var panInput = this._control.controller.panInput;
|
|
11917
|
+
if (panInput) {
|
|
11918
|
+
panInput.options.threshold = val;
|
|
11919
|
+
}
|
|
11920
|
+
},
|
|
11921
|
+
enumerable: false,
|
|
11922
|
+
configurable: true
|
|
11923
|
+
});
|
|
11888
11924
|
Object.defineProperty(__proto, "interruptable", {
|
|
11889
11925
|
/**
|
|
11890
11926
|
* Set animation to be interruptable by click/touch.
|
|
@@ -12959,10 +12995,189 @@ version: 4.11.3
|
|
|
12959
12995
|
* Flicking.VERSION; // ex) 4.0.0
|
|
12960
12996
|
* ```
|
|
12961
12997
|
*/
|
|
12962
|
-
Flicking.VERSION = "4.
|
|
12998
|
+
Flicking.VERSION = "4.12.0-beta.1";
|
|
12963
12999
|
return Flicking;
|
|
12964
13000
|
}(Component);
|
|
12965
13001
|
|
|
13002
|
+
/*
|
|
13003
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
13004
|
+
* egjs projects are licensed under the MIT license
|
|
13005
|
+
*/
|
|
13006
|
+
/**
|
|
13007
|
+
* @extends Component
|
|
13008
|
+
* @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
|
|
13009
|
+
* @requires {@link https://github.com/naver/egjs-component|@egjs/component}
|
|
13010
|
+
* @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
|
|
13011
|
+
*/
|
|
13012
|
+
var CrossFlicking = /*#__PURE__*/function (_super) {
|
|
13013
|
+
__extends$3(CrossFlicking, _super);
|
|
13014
|
+
// Options Setter
|
|
13015
|
+
// UI / LAYOUT
|
|
13016
|
+
// public set align(val: FlickingOptions["align"]) {
|
|
13017
|
+
// this._align = val;
|
|
13018
|
+
// }
|
|
13019
|
+
function CrossFlicking(root, _a) {
|
|
13020
|
+
var _b = (_a === void 0 ? {} : _a).verticalOptions,
|
|
13021
|
+
verticalOptions = _b === void 0 ? undefined : _b;
|
|
13022
|
+
var _this = _super.call(this, root) || this;
|
|
13023
|
+
_this._onHorizontalHoldStart = function () {
|
|
13024
|
+
_this.dragThreshold = 10;
|
|
13025
|
+
_this._moveDirection = null;
|
|
13026
|
+
};
|
|
13027
|
+
_this._onHorizontalMove = function (e) {
|
|
13028
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
13029
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13030
|
+
child.dragThreshold = Infinity;
|
|
13031
|
+
});
|
|
13032
|
+
_this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
|
|
13033
|
+
}
|
|
13034
|
+
};
|
|
13035
|
+
_this._onHorizontalMoveEnd = function (e) {
|
|
13036
|
+
var visiblePanels = _this.visiblePanels;
|
|
13037
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13038
|
+
child.dragThreshold = 10;
|
|
13039
|
+
});
|
|
13040
|
+
_this._moveDirection = null;
|
|
13041
|
+
if (visiblePanels.length > 1) {
|
|
13042
|
+
_this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
|
|
13043
|
+
} else {
|
|
13044
|
+
_this._nextIndex = visiblePanels[0].index;
|
|
13045
|
+
}
|
|
13046
|
+
_this._verticalFlicking.forEach(function (child, i) {
|
|
13047
|
+
if (_this._nextIndex !== i) {
|
|
13048
|
+
var _a = _this._verticalState[i],
|
|
13049
|
+
start = _a.start,
|
|
13050
|
+
end = _a.end;
|
|
13051
|
+
if (child.index < start) {
|
|
13052
|
+
child.stopAnimation();
|
|
13053
|
+
void child.moveTo(start, 0);
|
|
13054
|
+
} else if (child.index > end) {
|
|
13055
|
+
child.stopAnimation();
|
|
13056
|
+
void child.moveTo(end, 0);
|
|
13057
|
+
}
|
|
13058
|
+
}
|
|
13059
|
+
});
|
|
13060
|
+
if (e.isTrusted) {
|
|
13061
|
+
_this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
|
|
13062
|
+
}
|
|
13063
|
+
};
|
|
13064
|
+
_this._onVerticalHoldStart = function () {
|
|
13065
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13066
|
+
child.dragThreshold = 10;
|
|
13067
|
+
});
|
|
13068
|
+
_this._moveDirection = null;
|
|
13069
|
+
};
|
|
13070
|
+
_this._onVerticalMove = function (e) {
|
|
13071
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
13072
|
+
_this.dragThreshold = Infinity;
|
|
13073
|
+
_this._moveDirection = MOVE_DIRECTION.VERTICAL;
|
|
13074
|
+
}
|
|
13075
|
+
};
|
|
13076
|
+
_this._onVerticalMoveEnd = function () {
|
|
13077
|
+
_this.dragThreshold = 10;
|
|
13078
|
+
_this._moveDirection = null;
|
|
13079
|
+
};
|
|
13080
|
+
_this._onVerticalChanged = function (e) {
|
|
13081
|
+
// this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
|
|
13082
|
+
// 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
|
|
13083
|
+
if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
|
|
13084
|
+
_this._syncToCategory(e.index, _this.index);
|
|
13085
|
+
}
|
|
13086
|
+
};
|
|
13087
|
+
// Internal states
|
|
13088
|
+
_this._verticalState = [];
|
|
13089
|
+
_this._moveDirection = null;
|
|
13090
|
+
_this._nextIndex = 0;
|
|
13091
|
+
// Bind options
|
|
13092
|
+
_this._verticalOptions = verticalOptions;
|
|
13093
|
+
return _this;
|
|
13094
|
+
// Create core components
|
|
13095
|
+
// this._viewport = new Viewport(this, getElement(root));
|
|
13096
|
+
}
|
|
13097
|
+
var __proto = CrossFlicking.prototype;
|
|
13098
|
+
Object.defineProperty(__proto, "verticalOptions", {
|
|
13099
|
+
// Components
|
|
13100
|
+
/**
|
|
13101
|
+
* Change active panel index on mouse/touch hold while animating.
|
|
13102
|
+
* `index` of the `willChange`/`willRestore` event will be used as new index.
|
|
13103
|
+
* @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
|
|
13104
|
+
* `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
|
|
13105
|
+
* @type {FlickingOptions}
|
|
13106
|
+
* @default undefined
|
|
13107
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
|
|
13108
|
+
*/
|
|
13109
|
+
get: function () {
|
|
13110
|
+
return this._verticalOptions;
|
|
13111
|
+
},
|
|
13112
|
+
enumerable: false,
|
|
13113
|
+
configurable: true
|
|
13114
|
+
});
|
|
13115
|
+
/**
|
|
13116
|
+
* Initialize Flicking and move to the default index
|
|
13117
|
+
* This is automatically called on Flicking's constructor when `autoInit` is true(default)
|
|
13118
|
+
* @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
|
|
13119
|
+
* 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
|
|
13120
|
+
* @fires Flicking#ready
|
|
13121
|
+
* @return {Promise<void>}
|
|
13122
|
+
*/
|
|
13123
|
+
__proto.init = function () {
|
|
13124
|
+
var _this = this;
|
|
13125
|
+
return _super.prototype.init.call(this).then(function () {
|
|
13126
|
+
// data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
|
|
13127
|
+
// camera.children들에 대해 갯수 세기
|
|
13128
|
+
var verticalPanels = "";
|
|
13129
|
+
_this._verticalState = _this.camera.children.reduce(function (state, child) {
|
|
13130
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13131
|
+
verticalPanels += child.children[0].innerHTML;
|
|
13132
|
+
return __spread$1(state, [{
|
|
13133
|
+
start: start,
|
|
13134
|
+
end: start + child.children[0].children.length - 1,
|
|
13135
|
+
element: child
|
|
13136
|
+
}]);
|
|
13137
|
+
}, []);
|
|
13138
|
+
_this.camera.children.forEach(function (child) {
|
|
13139
|
+
child.children[0].innerHTML = verticalPanels;
|
|
13140
|
+
});
|
|
13141
|
+
_this._verticalFlicking = _this.camera.children.map(function (child, i) {
|
|
13142
|
+
return new Flicking(child, __assign$2(__assign$2({}, _this.verticalOptions), {
|
|
13143
|
+
horizontal: false,
|
|
13144
|
+
panelsPerView: 1,
|
|
13145
|
+
defaultIndex: _this._verticalState[i].start
|
|
13146
|
+
}));
|
|
13147
|
+
});
|
|
13148
|
+
_this.on(EVENTS.HOLD_START, _this._onHorizontalHoldStart);
|
|
13149
|
+
_this.on(EVENTS.MOVE, _this._onHorizontalMove);
|
|
13150
|
+
_this.on(EVENTS.MOVE_END, _this._onHorizontalMoveEnd);
|
|
13151
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13152
|
+
child.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
|
|
13153
|
+
child.on(EVENTS.MOVE, _this._onVerticalMove);
|
|
13154
|
+
child.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
|
|
13155
|
+
child.on(EVENTS.CHANGED, _this._onVerticalChanged);
|
|
13156
|
+
});
|
|
13157
|
+
});
|
|
13158
|
+
};
|
|
13159
|
+
__proto._syncToCategory = function (index, outerIndex) {
|
|
13160
|
+
var _this = this;
|
|
13161
|
+
this.stopAnimation();
|
|
13162
|
+
this._verticalFlicking.forEach(function (child, i) {
|
|
13163
|
+
var _a = _this._verticalState[i],
|
|
13164
|
+
start = _a.start,
|
|
13165
|
+
end = _a.end;
|
|
13166
|
+
if (start <= index && end >= index && outerIndex !== i) {
|
|
13167
|
+
child.stopAnimation();
|
|
13168
|
+
void child.moveTo(index, 0);
|
|
13169
|
+
void _this.moveTo(i, 0);
|
|
13170
|
+
}
|
|
13171
|
+
});
|
|
13172
|
+
};
|
|
13173
|
+
return CrossFlicking;
|
|
13174
|
+
}(Flicking);
|
|
13175
|
+
|
|
13176
|
+
var CrossFlicking$1 = {
|
|
13177
|
+
__proto__: null,
|
|
13178
|
+
CrossFlicking: CrossFlicking
|
|
13179
|
+
};
|
|
13180
|
+
|
|
12966
13181
|
/*
|
|
12967
13182
|
* Copyright (c) 2015 NAVER Corp.
|
|
12968
13183
|
* egjs projects are licensed under the MIT license
|
|
@@ -13208,6 +13423,7 @@ version: 4.11.3
|
|
|
13208
13423
|
merge(Flicking, Constants);
|
|
13209
13424
|
merge(Flicking, CFC);
|
|
13210
13425
|
merge(Flicking, Utils);
|
|
13426
|
+
merge(Flicking, CrossFlicking$1);
|
|
13211
13427
|
|
|
13212
13428
|
return Flicking;
|
|
13213
13429
|
|