@egjs/flicking 4.12.0-beta.4 → 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.
@@ -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.12.0-beta.4
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';
@@ -4259,8 +4259,8 @@ var Camera = /*#__PURE__*/function () {
4259
4259
  return this;
4260
4260
  };
4261
4261
  /**
4262
- * Update Viewport's height to active panel's height
4263
- * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4262
+ * Update Viewport's height to visible panel's max height
4263
+ * @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4264
4264
  * @throws {FlickingError}
4265
4265
  * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
4266
4266
  * <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
@@ -4270,9 +4270,17 @@ var Camera = /*#__PURE__*/function () {
4270
4270
  __proto.updateAdaptiveHeight = function () {
4271
4271
  var flicking = getFlickingAttached(this._flicking);
4272
4272
  var activePanel = flicking.control.activePanel;
4273
- 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
+ })));
4274
4282
  flicking.viewport.setSize({
4275
- height: activePanel.height
4283
+ height: maxHeight
4276
4284
  });
4277
4285
  };
4278
4286
  /**
@@ -7865,7 +7873,7 @@ var Flicking = /*#__PURE__*/function (_super) {
7865
7873
  * Flicking.VERSION; // ex) 4.0.0
7866
7874
  * ```
7867
7875
  */
7868
- Flicking.VERSION = "4.12.0-beta.4";
7876
+ Flicking.VERSION = "4.12.0-beta.5";
7869
7877
  return Flicking;
7870
7878
  }(Component);
7871
7879