@egjs/flicking 4.14.2-beta.1 → 4.14.2-beta.2

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.14.2-beta.1
7
+ version: 4.14.2-beta.2
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -10570,8 +10570,8 @@ version: 4.14.2-beta.1
10570
10570
  __proto._afterRender = function () {
10571
10571
  var flicking = getFlickingAttached(this._flicking);
10572
10572
  flicking.camera.applyTransform();
10573
- if (flicking.useCSSOrderProperty) {
10574
- // useCSSOrderProperty를 사용하는 경우 DOM은 변화가 없지만 대신 CSS Order가 추가 된다.
10573
+ if (flicking.useCSSOrder) {
10574
+ // useCSSOrder를 사용하는 경우 DOM은 변화가 없지만 대신 CSS Order가 추가 된다.
10575
10575
  var panels_1 = flicking.panels;
10576
10576
  this._strategy.getRenderingIndexesByOrder(flicking).forEach(function (domIndex, index) {
10577
10577
  panels_1[domIndex].element.style.order = "" + index;
@@ -10620,8 +10620,8 @@ version: 4.14.2-beta.1
10620
10620
  var cameraEl = flicking.camera.element;
10621
10621
  // We're using reversed panels here as last panel should be the last element of camera element
10622
10622
  var reversedElements = [];
10623
- if (flicking.useCSSOrderProperty) {
10624
- // useCSSOrderProperty를 사용하는 경우 원본 그대로 렌더링
10623
+ if (flicking.useCSSOrder) {
10624
+ // useCSSOrder를 사용하는 경우 원본 그대로 렌더링
10625
10625
  reversedElements = this.getRenderedPanels().map(function (panel) {
10626
10626
  return panel.element;
10627
10627
  }).reverse();
@@ -11707,9 +11707,10 @@ version: 4.14.2-beta.1
11707
11707
  optimizeSizeUpdate = _16 === void 0 ? false : _16,
11708
11708
  _17 = _b.animationThreshold,
11709
11709
  animationThreshold = _17 === void 0 ? 0.5 : _17,
11710
- _18 = _b.useCSSOrderProperty,
11711
- useCSSOrderProperty = _18 === void 0 ? false : _18;
11710
+ _18 = _b.useCSSOrder,
11711
+ useCSSOrder = _18 === void 0 ? false : _18;
11712
11712
  var _this = _super.call(this) || this;
11713
+ _this._scheduleResize = false;
11713
11714
  // Internal states
11714
11715
  _this._initialized = false;
11715
11716
  _this._plugins = [];
@@ -11755,7 +11756,7 @@ version: 4.14.2-beta.1
11755
11756
  _this._renderExternal = renderExternal;
11756
11757
  _this._optimizeSizeUpdate = optimizeSizeUpdate;
11757
11758
  _this._animationThreshold = animationThreshold;
11758
- _this._useCSSOrderProperty = useCSSOrderProperty;
11759
+ _this._useCSSOrder = useCSSOrder;
11759
11760
  // Create core components
11760
11761
  _this._viewport = new Viewport(_this, getElement(root));
11761
11762
  _this._autoResizer = new AutoResizer(_this);
@@ -12484,22 +12485,23 @@ version: 4.14.2-beta.1
12484
12485
  enumerable: false,
12485
12486
  configurable: true
12486
12487
  });
12487
- Object.defineProperty(__proto, "useCSSOrderProperty", {
12488
+ Object.defineProperty(__proto, "useCSSOrder", {
12488
12489
  /**
12489
- * When `circular` is used, the DOM order changes depending on the position. Using `useCSSOrderProperty` does not change the DOM order, but the `order` CSS property changes the order on the screen.
12490
+ * Using `useCSSOrder` does not change the DOM order, but the `order` CSS property changes the order on the screen. (When `circular` is used, the DOM order changes depending on the position.)
12490
12491
  * When using `iframe`, you can prevent reloading when the DOM order changes.
12491
- * @ko `circular`를 사용한 경우 위치에 따라 DOM의 순서가 변경된다. `useCSSOrderProperty`를 사용하면 DOM의 순서는 변경되지 않지만 `order` css가 설정되면서 화면상 순서가 바뀐다.
12492
+ * In svelte, CSS order is always used.
12493
+ * @ko `useCSSOrder`를 사용하면 DOM의 순서는 변경되지 않지만 `order` css가 설정되면서 화면상 순서가 바뀐다. (`circular`를 사용한 경우 위치에 따라 DOM의 순서가 변경된다.)
12492
12494
  * `iframe`을 사용하는 경우 DOM의 순서가 변경되면서 reload가 되는 것을 막을 수 있다.
12495
+ * svelte에서는 css order를 무조건 사용한다.
12493
12496
  * @type {boolean}
12494
- * @requires `circular`
12495
12497
  * @default false
12496
- * @see {@link https://naver.github.io/egjs-flicking/Options#useCSSOrderProperty animationThreshold ( Options )}
12498
+ * @see {@link https://naver.github.io/egjs-flicking/Options#useCSSOrder useCSSOrder ( Options )}
12497
12499
  */
12498
12500
  get: function () {
12499
- return this._useCSSOrderProperty;
12501
+ return this._useCSSOrder;
12500
12502
  },
12501
12503
  set: function (val) {
12502
- this._useCSSOrderProperty = val;
12504
+ this._useCSSOrder = val;
12503
12505
  },
12504
12506
  enumerable: false,
12505
12507
  configurable: true
@@ -12986,7 +12988,9 @@ version: 4.14.2-beta.1
12986
12988
  this._plugins.forEach(function (plugin) {
12987
12989
  return plugin.destroy();
12988
12990
  });
12991
+ this._scheduleResize = false;
12989
12992
  this._initialized = false;
12993
+ this._isResizing = false;
12990
12994
  };
12991
12995
  /**
12992
12996
  * Move to the previous panel (current index - 1)
@@ -13351,7 +13355,7 @@ version: 4.14.2-beta.1
13351
13355
  * @method
13352
13356
  * @fires Flicking#beforeResize
13353
13357
  * @fires Flicking#afterResize
13354
- * @return {this}
13358
+ * @return {boolean}
13355
13359
  */
13356
13360
  __proto.resize = function () {
13357
13361
  return __awaiter(this, void 0, void 0, function () {
@@ -13359,7 +13363,16 @@ version: 4.14.2-beta.1
13359
13363
  return __generator(this, function (_a) {
13360
13364
  switch (_a.label) {
13361
13365
  case 0:
13362
- if (this._isResizing) return [2 /*return*/];
13366
+ if (!this._initialized) {
13367
+ return [2 /*return*/];
13368
+ }
13369
+
13370
+ if (this._isResizing) {
13371
+ this._scheduleResize = true;
13372
+ return [2 /*return*/];
13373
+ }
13374
+
13375
+ this._scheduleResize = false;
13363
13376
  this._isResizing = true;
13364
13377
  viewport = this._viewport;
13365
13378
  renderer = this._renderer;
@@ -13425,6 +13438,9 @@ version: 4.14.2-beta.1
13425
13438
  element: viewport.element
13426
13439
  }));
13427
13440
  this._isResizing = false;
13441
+ if (this._scheduleResize) {
13442
+ this.resize();
13443
+ }
13428
13444
  return [2 /*return*/];
13429
13445
  }
13430
13446
  });
@@ -13644,7 +13660,7 @@ version: 4.14.2-beta.1
13644
13660
  * Flicking.VERSION; // ex) 4.0.0
13645
13661
  * ```
13646
13662
  */
13647
- Flicking.VERSION = "4.14.2-beta.1";
13663
+ Flicking.VERSION = "4.14.2-beta.2";
13648
13664
  return Flicking;
13649
13665
  }(Component);
13650
13666
 
@@ -14186,8 +14202,8 @@ version: 4.14.2-beta.1
14186
14202
  var renderingPanels = flicking.panels.filter(function (panel) {
14187
14203
  return !removedPanels[panel.index];
14188
14204
  });
14189
- if (!flicking.useCSSOrderProperty) {
14190
- // useCSSOrderProperty를 사용하게 되는 경우 sort를 하지 않는다.
14205
+ if (!flicking.useCSSOrder) {
14206
+ // useCSSOrder를 사용하게 되는 경우 sort를 하지 않는다.
14191
14207
  renderingPanels.sort(function (panel1, panel2) {
14192
14208
  return panel1.position + panel1.offset - (panel2.position + panel2.offset);
14193
14209
  });