@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.
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.12.0-beta.4
7
+ version: 4.12.0-beta.5
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')) :
@@ -4327,8 +4327,8 @@ version: 4.12.0-beta.4
4327
4327
  return this;
4328
4328
  };
4329
4329
  /**
4330
- * Update Viewport's height to active panel's height
4331
- * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4330
+ * Update Viewport's height to visible panel's max height
4331
+ * @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
4332
4332
  * @throws {FlickingError}
4333
4333
  * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
4334
4334
  * <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
@@ -4338,9 +4338,17 @@ version: 4.12.0-beta.4
4338
4338
  __proto.updateAdaptiveHeight = function () {
4339
4339
  var flicking = getFlickingAttached(this._flicking);
4340
4340
  var activePanel = flicking.control.activePanel;
4341
- if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;
4341
+ var visiblePanels = flicking.visiblePanels;
4342
+ var selectedPanels = __spread(visiblePanels);
4343
+ if (activePanel) {
4344
+ selectedPanels.push(activePanel);
4345
+ }
4346
+ if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
4347
+ var maxHeight = Math.max.apply(Math, __spread(selectedPanels.map(function (panel) {
4348
+ return panel.height;
4349
+ })));
4342
4350
  flicking.viewport.setSize({
4343
- height: activePanel.height
4351
+ height: maxHeight
4344
4352
  });
4345
4353
  };
4346
4354
  /**
@@ -7960,7 +7968,7 @@ version: 4.12.0-beta.4
7960
7968
  * Flicking.VERSION; // ex) 4.0.0
7961
7969
  * ```
7962
7970
  */
7963
- Flicking.VERSION = "4.12.0-beta.4";
7971
+ Flicking.VERSION = "4.12.0-beta.5";
7964
7972
  return Flicking;
7965
7973
  }(Component);
7966
7974