@egjs/flicking 4.4.1 → 4.4.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.4.1
7
+ version: 4.4.2
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -10174,7 +10174,7 @@ version: 4.4.1
10174
10174
  * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위
10175
10175
  * @type {object}
10176
10176
  * @property {number} min A minimum position<ko>최소 위치</ko>
10177
- * @property {number} min A maximum position<ko>최대 위치</ko>
10177
+ * @property {number} max A maximum position<ko>최대 위치</ko>
10178
10178
  * @readonly
10179
10179
  */
10180
10180
  get: function () {
@@ -15656,7 +15656,7 @@ version: 4.4.1
15656
15656
  */
15657
15657
 
15658
15658
 
15659
- Flicking.VERSION = "4.4.1";
15659
+ Flicking.VERSION = "4.4.2";
15660
15660
  return Flicking;
15661
15661
  }(Component$1);
15662
15662
 
@@ -15750,6 +15750,8 @@ version: 4.4.1
15750
15750
  var renderer = flicking.renderer;
15751
15751
  var panels = renderer.panels;
15752
15752
 
15753
+ var prevList = __spreadArray([], __read$1(diffResult.prevList));
15754
+
15753
15755
  if (diffResult.removed.length > 0) {
15754
15756
  var endIdx_1 = -1;
15755
15757
  var prevIdx_1 = -1;
@@ -15765,6 +15767,8 @@ version: 4.4.1
15765
15767
  } else {
15766
15768
  prevIdx_1 = removedIdx;
15767
15769
  }
15770
+
15771
+ prevList.splice(removedIdx, 1);
15768
15772
  });
15769
15773
  batchRemove(renderer, prevIdx_1, endIdx_1 + 1);
15770
15774
  }
@@ -15804,13 +15808,14 @@ version: 4.4.1
15804
15808
  if (diffResult.added.length > 0) {
15805
15809
  var startIdx_1 = -1;
15806
15810
  var prevIdx_2 = -1;
15811
+ var addedElements_1 = rendered.slice(prevList.length);
15807
15812
  diffResult.added.forEach(function (addedIdx, idx) {
15808
15813
  if (startIdx_1 < 0) {
15809
15814
  startIdx_1 = idx;
15810
15815
  }
15811
15816
 
15812
15817
  if (prevIdx_2 >= 0 && addedIdx !== prevIdx_2 + 1) {
15813
- batchInsert(renderer, diffResult, rendered, startIdx_1, idx + 1);
15818
+ batchInsert(renderer, diffResult, addedElements_1, startIdx_1, idx + 1);
15814
15819
  startIdx_1 = -1;
15815
15820
  prevIdx_2 = -1;
15816
15821
  } else {
@@ -15819,16 +15824,16 @@ version: 4.4.1
15819
15824
  });
15820
15825
 
15821
15826
  if (startIdx_1 >= 0) {
15822
- batchInsert(renderer, diffResult, rendered, startIdx_1);
15827
+ batchInsert(renderer, diffResult, addedElements_1, startIdx_1);
15823
15828
  }
15824
15829
  }
15825
15830
  });
15826
15831
 
15827
- var batchInsert = function (renderer, diffResult, rendered, startIdx, endIdx) {
15832
+ var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) {
15828
15833
  renderer.batchInsert.apply(renderer, __spreadArray([], __read$1(diffResult.added.slice(startIdx, endIdx).map(function (index, elIdx) {
15829
15834
  return {
15830
15835
  index: index,
15831
- elements: [rendered[elIdx + diffResult.prevList.length]],
15836
+ elements: [addedElements[elIdx]],
15832
15837
  hasDOMInElements: false
15833
15838
  };
15834
15839
  }))));