@egjs/flicking 4.12.0-beta.3 → 4.12.0-beta.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.
Files changed (78) hide show
  1. package/declaration/Flicking.d.ts +244 -244
  2. package/declaration/camera/Camera.d.ts +90 -89
  3. package/declaration/camera/index.d.ts +4 -4
  4. package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
  5. package/declaration/camera/mode/CameraMode.d.ts +20 -20
  6. package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
  7. package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
  8. package/declaration/camera/mode/index.d.ts +6 -6
  9. package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
  10. package/declaration/cfc/getRenderingPanels.d.ts +4 -4
  11. package/declaration/cfc/index.d.ts +5 -5
  12. package/declaration/cfc/sync.d.ts +4 -4
  13. package/declaration/cfc/withFlickingMethods.d.ts +2 -2
  14. package/declaration/const/axes.d.ts +8 -8
  15. package/declaration/const/error.d.ts +34 -34
  16. package/declaration/const/external.d.ts +48 -54
  17. package/declaration/control/AxesController.d.ts +44 -44
  18. package/declaration/control/Control.d.ts +45 -45
  19. package/declaration/control/FreeControl.d.ts +14 -14
  20. package/declaration/control/SnapControl.d.ts +16 -16
  21. package/declaration/control/StateMachine.d.ts +14 -14
  22. package/declaration/control/StrictControl.d.ts +20 -20
  23. package/declaration/control/index.d.ts +14 -14
  24. package/declaration/control/states/AnimatingState.d.ts +9 -9
  25. package/declaration/control/states/DisabledState.d.ts +9 -9
  26. package/declaration/control/states/DraggingState.d.ts +8 -8
  27. package/declaration/control/states/HoldingState.d.ts +10 -10
  28. package/declaration/control/states/IdleState.d.ts +9 -9
  29. package/declaration/control/states/State.d.ts +47 -47
  30. package/declaration/core/AnchorPoint.d.ts +15 -15
  31. package/declaration/core/AutoResizer.d.ts +16 -16
  32. package/declaration/core/FlickingError.d.ts +5 -5
  33. package/declaration/core/ResizeWatcher.d.ts +33 -33
  34. package/declaration/core/Viewport.d.ts +25 -25
  35. package/declaration/core/VirtualManager.d.ts +37 -37
  36. package/declaration/core/index.d.ts +6 -6
  37. package/declaration/core/panel/Panel.d.ts +89 -89
  38. package/declaration/core/panel/VirtualPanel.d.ts +19 -19
  39. package/declaration/core/panel/index.d.ts +5 -5
  40. package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
  41. package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
  42. package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
  43. package/declaration/core/panel/provider/index.d.ts +5 -5
  44. package/declaration/index.cjs.d.ts +3 -3
  45. package/declaration/index.d.ts +13 -14
  46. package/declaration/index.umd.d.ts +2 -2
  47. package/declaration/renderer/ExternalRenderer.d.ts +7 -7
  48. package/declaration/renderer/Renderer.d.ts +59 -59
  49. package/declaration/renderer/VanillaRenderer.d.ts +10 -10
  50. package/declaration/renderer/index.d.ts +6 -6
  51. package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
  52. package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
  53. package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
  54. package/declaration/renderer/strategy/index.d.ts +5 -5
  55. package/declaration/type/event.d.ts +88 -88
  56. package/declaration/type/external.d.ts +31 -31
  57. package/declaration/type/internal.d.ts +13 -13
  58. package/declaration/utils.d.ts +45 -47
  59. package/dist/flicking.cjs.js +27 -328
  60. package/dist/flicking.cjs.js.map +1 -1
  61. package/dist/flicking.esm.js +27 -320
  62. package/dist/flicking.esm.js.map +1 -1
  63. package/dist/flicking.js +27 -329
  64. package/dist/flicking.js.map +1 -1
  65. package/dist/flicking.min.js +2 -2
  66. package/dist/flicking.min.js.map +1 -1
  67. package/dist/flicking.pkgd.js +785 -1094
  68. package/dist/flicking.pkgd.js.map +1 -1
  69. package/dist/flicking.pkgd.min.js +2 -2
  70. package/dist/flicking.pkgd.min.js.map +1 -1
  71. package/package.json +2 -2
  72. package/src/camera/Camera.ts +24 -4
  73. package/src/const/external.ts +0 -14
  74. package/src/index.ts +0 -2
  75. package/src/index.umd.ts +0 -2
  76. package/src/utils.ts +0 -21
  77. package/declaration/CrossFlicking.d.ts +0 -35
  78. package/src/CrossFlicking.ts +0 -356
@@ -4,13 +4,13 @@ name: @egjs/flicking
4
4
  license: MIT
5
5
  author: NAVER Corp.
6
6
  repository: https://github.com/naver/egjs-flicking
7
- version: 4.12.0-beta.3
7
+ version: 4.12.0-beta.5
8
8
  */
9
9
  import Component, { ComponentEvent } from '@egjs/component';
10
10
  import Axes, { PanInput } from '@egjs/axes';
11
11
  import ImReady from '@egjs/imready';
12
12
 
13
- /******************************************************************************
13
+ /*! *****************************************************************************
14
14
  Copyright (c) Microsoft Corporation.
15
15
 
16
16
  Permission to use, copy, modify, and/or distribute this software for any
@@ -24,7 +24,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
24
24
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
25
25
  PERFORMANCE OF THIS SOFTWARE.
26
26
  ***************************************************************************** */
27
- /* global Reflect, Promise, SuppressedError, Symbol */
27
+ /* global Reflect, Promise */
28
28
 
29
29
  var extendStatics = function (d, b) {
30
30
  extendStatics = Object.setPrototypeOf || {
@@ -109,7 +109,7 @@ function __generator(thisArg, body) {
109
109
  }
110
110
  function step(op) {
111
111
  if (f) throw new TypeError("Generator is already executing.");
112
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
112
+ while (_) try {
113
113
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
114
114
  if (y = 0, t) op = [op[0] & 2, t.value];
115
115
  switch (op[0]) {
@@ -213,10 +213,6 @@ function __spread() {
213
213
  for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
214
214
  return ar;
215
215
  }
216
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
217
- var e = new Error(message);
218
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
219
- };
220
216
 
221
217
  /*
222
218
  * Copyright (c) 2015 NAVER Corp.
@@ -385,8 +381,6 @@ var MOVE_TYPE = {
385
381
  STRICT: "strict"
386
382
  };
387
383
  var CLASS = {
388
- VIEWPORT: "flicking-viewport",
389
- CAMERA: "flicking-camera",
390
384
  VERTICAL: "vertical",
391
385
  HIDDEN: "flicking-hidden",
392
386
  DEFAULT_VIRTUAL: "flicking-panel"
@@ -413,17 +407,6 @@ var ORDER = {
413
407
  LTR: "ltr",
414
408
  RTL: "rtl"
415
409
  };
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
- };
427
410
 
428
411
  // eslint-disable-next-line @typescript-eslint/ban-types
429
412
  var merge = function (target) {
@@ -738,26 +721,6 @@ var setPrototypeOf = Object.setPrototypeOf || function (obj, proto) {
738
721
  obj.__proto__ = proto;
739
722
  return obj;
740
723
  };
741
- var camelize = function (str) {
742
- return str.replace(/[\s-_]([a-z])/g, function (all, letter) {
743
- return letter.toUpperCase();
744
- });
745
- };
746
- var getDataAttributes = function (element, attributePrefix) {
747
- var dataAttributes = {};
748
- var attributes = element.attributes;
749
- var length = attributes.length;
750
- for (var i = 0; i < length; ++i) {
751
- var attribute = attributes[i];
752
- var name_1 = attribute.name,
753
- value = attribute.value;
754
- if (name_1.indexOf(attributePrefix) === -1) {
755
- continue;
756
- }
757
- dataAttributes[camelize(name_1.replace(attributePrefix, ""))] = value;
758
- }
759
- return dataAttributes;
760
- };
761
724
 
762
725
  /*
763
726
  * Copyright (c) 2015 NAVER Corp.
@@ -3744,6 +3707,7 @@ var Camera = /*#__PURE__*/function () {
3744
3707
  var _this = this;
3745
3708
  var _b = (_a === void 0 ? {} : _a).align,
3746
3709
  align = _b === void 0 ? ALIGN.CENTER : _b;
3710
+ this._lookedOffset = 0;
3747
3711
  this._checkTranslateSupport = function () {
3748
3712
  var e_1, _a;
3749
3713
  var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
@@ -4103,6 +4067,8 @@ var Camera = /*#__PURE__*/function () {
4103
4067
  */
4104
4068
  __proto.lookAt = function (pos) {
4105
4069
  var _this = this;
4070
+ var prevOffset = this._offset;
4071
+ var isChangedOffset = this._lookedOffset !== prevOffset;
4106
4072
  var flicking = getFlickingAttached(this._flicking);
4107
4073
  var prevPos = this._position;
4108
4074
  this._position = pos;
@@ -4113,7 +4079,12 @@ var Camera = /*#__PURE__*/function () {
4113
4079
  if (toggled) {
4114
4080
  void flicking.renderer.render().then(function () {
4115
4081
  _this.updateOffset();
4082
+ _this._lookedOffset = _this._offset;
4116
4083
  });
4084
+ } else if (isChangedOffset) {
4085
+ // sync offset for renderOnlyVisible on resize
4086
+ this.updateOffset();
4087
+ this._lookedOffset = this._offset;
4117
4088
  } else {
4118
4089
  this.applyTransform();
4119
4090
  }
@@ -4288,8 +4259,8 @@ var Camera = /*#__PURE__*/function () {
4288
4259
  return this;
4289
4260
  };
4290
4261
  /**
4291
- * Update Viewport's height to active panel's height
4292
- * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4262
+ * Update Viewport's height to visible panel's max height
4263
+ * @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4293
4264
  * @throws {FlickingError}
4294
4265
  * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
4295
4266
  * <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
@@ -4299,9 +4270,17 @@ var Camera = /*#__PURE__*/function () {
4299
4270
  __proto.updateAdaptiveHeight = function () {
4300
4271
  var flicking = getFlickingAttached(this._flicking);
4301
4272
  var activePanel = flicking.control.activePanel;
4302
- if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;
4273
+ var visiblePanels = flicking.visiblePanels;
4274
+ var selectedPanels = __spread(visiblePanels);
4275
+ if (activePanel) {
4276
+ selectedPanels.push(activePanel);
4277
+ }
4278
+ if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
4279
+ var maxHeight = Math.max.apply(Math, __spread(selectedPanels.map(function (panel) {
4280
+ return panel.height;
4281
+ })));
4303
4282
  flicking.viewport.setSize({
4304
- height: activePanel.height
4283
+ height: maxHeight
4305
4284
  });
4306
4285
  };
4307
4286
  /**
@@ -4372,6 +4351,7 @@ var Camera = /*#__PURE__*/function () {
4372
4351
  };
4373
4352
  __proto._resetInternalValues = function () {
4374
4353
  this._position = 0;
4354
+ this._lookedOffset = 0;
4375
4355
  this._alignPos = 0;
4376
4356
  this._offset = 0;
4377
4357
  this._circularOffset = 0;
@@ -7893,283 +7873,10 @@ var Flicking = /*#__PURE__*/function (_super) {
7893
7873
  * Flicking.VERSION; // ex) 4.0.0
7894
7874
  * ```
7895
7875
  */
7896
- Flicking.VERSION = "4.12.0-beta.3";
7876
+ Flicking.VERSION = "4.12.0-beta.5";
7897
7877
  return Flicking;
7898
7878
  }(Component);
7899
7879
 
7900
- /*
7901
- * Copyright (c) 2015 NAVER Corp.
7902
- * egjs projects are licensed under the MIT license
7903
- */
7904
- /**
7905
- * @extends Component
7906
- * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
7907
- * @requires {@link https://github.com/naver/egjs-component|@egjs/component}
7908
- * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
7909
- */
7910
- var CrossFlicking = /*#__PURE__*/function (_super) {
7911
- __extends(CrossFlicking, _super);
7912
- // Options Setter
7913
- // public set align(val: FlickingOptions["align"]) {
7914
- // this._align = val;
7915
- // }
7916
- function CrossFlicking(root, _a) {
7917
- var _b = (_a === void 0 ? {} : _a).verticalOptions,
7918
- verticalOptions = _b === void 0 ? undefined : _b;
7919
- var _this = _super.call(this, root) || this;
7920
- _this._onHorizontalHoldStart = function () {
7921
- _this.dragThreshold = 10;
7922
- _this._moveDirection = null;
7923
- };
7924
- _this._onHorizontalMove = function (e) {
7925
- if (e.isTrusted && !_this._moveDirection) {
7926
- _this._verticalFlicking.forEach(function (child) {
7927
- child.dragThreshold = Infinity;
7928
- });
7929
- _this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
7930
- }
7931
- };
7932
- _this._onHorizontalMoveEnd = function (e) {
7933
- var visiblePanels = _this.visiblePanels;
7934
- _this._verticalFlicking.forEach(function (child) {
7935
- child.dragThreshold = 10;
7936
- });
7937
- _this._moveDirection = null;
7938
- if (visiblePanels.length > 1) {
7939
- _this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
7940
- } else {
7941
- _this._nextIndex = visiblePanels[0].index;
7942
- }
7943
- _this._verticalFlicking.forEach(function (child, i) {
7944
- if (_this._nextIndex !== i) {
7945
- var _a = _this._verticalState[i],
7946
- start = _a.start,
7947
- end = _a.end;
7948
- if (child.index < start) {
7949
- child.stopAnimation();
7950
- void child.moveTo(start, 0);
7951
- } else if (child.index > end) {
7952
- child.stopAnimation();
7953
- void child.moveTo(end, 0);
7954
- }
7955
- }
7956
- });
7957
- if (e.isTrusted) {
7958
- _this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
7959
- }
7960
- };
7961
- _this._onVerticalHoldStart = function () {
7962
- _this._verticalFlicking.forEach(function (child) {
7963
- child.dragThreshold = 10;
7964
- });
7965
- _this._moveDirection = null;
7966
- };
7967
- _this._onVerticalMove = function (e) {
7968
- if (e.isTrusted && !_this._moveDirection) {
7969
- _this.dragThreshold = Infinity;
7970
- _this._moveDirection = MOVE_DIRECTION.VERTICAL;
7971
- }
7972
- };
7973
- _this._onVerticalMoveEnd = function () {
7974
- _this.dragThreshold = 10;
7975
- _this._moveDirection = null;
7976
- };
7977
- _this._onVerticalChanged = function (e) {
7978
- // this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
7979
- // 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
7980
- if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
7981
- _this._syncToCategory(e.index, _this.index);
7982
- }
7983
- };
7984
- // Internal states
7985
- _this._verticalState = _this._createVerticalState();
7986
- _this._moveDirection = null;
7987
- _this._nextIndex = 0;
7988
- // Bind options
7989
- _this._verticalOptions = verticalOptions;
7990
- // Create core components
7991
- _this._verticalFlicking = _this._createVerticalFlicking();
7992
- return _this;
7993
- }
7994
- var __proto = CrossFlicking.prototype;
7995
- Object.defineProperty(__proto, "verticalFlicking", {
7996
- // Components
7997
- /**
7998
- * {@link Control} instance of the Flicking
7999
- * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스
8000
- * @type {Control}
8001
- * @default SnapControl
8002
- * @readonly
8003
- * @see Control
8004
- * @see SnapControl
8005
- * @see FreeControl
8006
- */
8007
- get: function () {
8008
- return this._verticalFlicking;
8009
- },
8010
- enumerable: false,
8011
- configurable: true
8012
- });
8013
- Object.defineProperty(__proto, "verticalState", {
8014
- // Internal States
8015
- /**
8016
- * Whether Flicking's {@link Flicking#init init()} is called.
8017
- * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.
8018
- * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.
8019
- * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.
8020
- * @type {boolean}
8021
- * @default false
8022
- * @readonly
8023
- */
8024
- get: function () {
8025
- return this._verticalState;
8026
- },
8027
- enumerable: false,
8028
- configurable: true
8029
- });
8030
- Object.defineProperty(__proto, "verticalOptions", {
8031
- // Options Getter
8032
- /**
8033
- * Change active panel index on mouse/touch hold while animating.
8034
- * `index` of the `willChange`/`willRestore` event will be used as new index.
8035
- * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
8036
- * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
8037
- * @type {FlickingOptions}
8038
- * @default undefined
8039
- * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
8040
- */
8041
- get: function () {
8042
- return this._verticalOptions;
8043
- },
8044
- enumerable: false,
8045
- configurable: true
8046
- });
8047
- /**
8048
- * Initialize Flicking and move to the default index
8049
- * This is automatically called on Flicking's constructor when `autoInit` is true(default)
8050
- * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
8051
- * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
8052
- * @fires Flicking#ready
8053
- * @return {Promise<void>}
8054
- */
8055
- __proto.init = function () {
8056
- var _this = this;
8057
- return _super.prototype.init.call(this).then(function () {
8058
- return _this._addComponentEvents();
8059
- });
8060
- };
8061
- __proto._addComponentEvents = function () {
8062
- var _this = this;
8063
- this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
8064
- this.on(EVENTS.MOVE, this._onHorizontalMove);
8065
- this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
8066
- this._verticalFlicking.forEach(function (flicking) {
8067
- flicking.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
8068
- flicking.on(EVENTS.MOVE, _this._onVerticalMove);
8069
- flicking.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
8070
- flicking.on(EVENTS.CHANGED, _this._onVerticalChanged);
8071
- });
8072
- };
8073
- __proto._createVerticalState = function () {
8074
- var _this = this;
8075
- // data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
8076
- // panels에 data-attributes가 붙어있을 때와 안 붙어있을 때를 다르게 처리
8077
- // 붙어있다면 가상의 viewport들을 index 갯수만큼 만들어줘야 한다
8078
- var cameraEl = this.camera.element;
8079
- var panels = toArray(cameraEl.children);
8080
- var verticalState;
8081
- var verticalPanels = "";
8082
- // check data attribute exists
8083
- var groupKeys = [];
8084
- var groupPanels = {};
8085
- var verticalCamera = document.createElement("div");
8086
- verticalCamera.classList.add(CLASS.CAMERA);
8087
- panels.forEach(function (panel) {
8088
- var groupKey = getDataAttributes(panel, "data-flicking-").groupkey;
8089
- if (groupKey && !includes(groupKeys, groupKey)) {
8090
- groupKeys.push(groupKey);
8091
- groupPanels[groupKey] = [panel];
8092
- } else if (groupKey) {
8093
- groupPanels[groupKey].push(panel);
8094
- }
8095
- return groupKey;
8096
- });
8097
- if (groupKeys.length) {
8098
- panels.forEach(function () {
8099
- return _this.remove(0);
8100
- });
8101
- verticalState = groupKeys.reduce(function (state, key) {
8102
- var start = state.length ? +state[state.length - 1].end + 1 : 0;
8103
- var element = groupPanels[key].reduce(function (el, panel) {
8104
- verticalPanels += panel.outerHTML;
8105
- el.appendChild(panel);
8106
- return el;
8107
- }, document.createElement("div"));
8108
- return __spread(state, [{
8109
- key: key,
8110
- start: start,
8111
- end: start + groupPanels[key].length - 1,
8112
- element: element
8113
- }]);
8114
- }, []);
8115
- verticalCamera.innerHTML = verticalPanels;
8116
- cameraEl.innerHTML = "";
8117
- groupKeys.forEach(function () {
8118
- var panel = document.createElement("div");
8119
- panel.classList.add(CLASS.VIEWPORT, CLASS.VERTICAL);
8120
- panel.innerHTML = verticalCamera.outerHTML;
8121
- _this.append(panel);
8122
- });
8123
- } else {
8124
- verticalState = panels.reduce(function (state, panel, i) {
8125
- var start = state.length ? +state[state.length - 1].end + 1 : 0;
8126
- verticalPanels += panel.innerHTML;
8127
- return __spread(state, [{
8128
- key: i.toString(),
8129
- start: start,
8130
- end: start + panel.children.length - 1,
8131
- element: panel
8132
- }]);
8133
- }, []);
8134
- verticalCamera.innerHTML = verticalPanels;
8135
- panels.forEach(function (panel) {
8136
- [CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
8137
- if (!panel.classList.contains(className)) {
8138
- panel.classList.add(className);
8139
- }
8140
- });
8141
- panel.innerHTML = verticalCamera.outerHTML;
8142
- });
8143
- }
8144
- return verticalState;
8145
- };
8146
- __proto._createVerticalFlicking = function () {
8147
- var _this = this;
8148
- return this.camera.children.map(function (panel, i) {
8149
- return new Flicking(panel, __assign(__assign({}, _this.verticalOptions), {
8150
- horizontal: false,
8151
- panelsPerView: 1,
8152
- defaultIndex: _this._verticalState[i].start
8153
- }));
8154
- });
8155
- };
8156
- __proto._syncToCategory = function (index, outerIndex) {
8157
- var _this = this;
8158
- this.stopAnimation();
8159
- this._verticalFlicking.forEach(function (child, i) {
8160
- var _a = _this._verticalState[i],
8161
- start = _a.start,
8162
- end = _a.end;
8163
- if (start <= index && end >= index && outerIndex !== i) {
8164
- child.stopAnimation();
8165
- void child.moveTo(index, 0);
8166
- void _this.moveTo(i, 0);
8167
- }
8168
- });
8169
- };
8170
- return CrossFlicking;
8171
- }(Flicking);
8172
-
8173
7880
  /**
8174
7881
  * Decorator that makes the method of flicking available in the framework.
8175
7882
  * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.
@@ -8384,5 +8091,5 @@ var parseAlign = function (alignVal) {
8384
8091
  * egjs projects are licensed under the MIT license
8385
8092
  */
8386
8093
 
8387
- 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, camelize, checkExistence, circulateIndex, circulatePosition, clamp, Flicking as default, find, findIndex, findRight, getDataAttributes, 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 };
8094
+ 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 };
8388
8095
  //# sourceMappingURL=flicking.esm.js.map