@egjs/flicking 4.14.1-beta.0 → 4.14.1-beta.3

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.1-beta.0
7
+ version: 4.14.1-beta.3
8
8
  */
9
9
  import Component, { ComponentEvent } from '@egjs/component';
10
10
  import Axes, { PanInput } from '@egjs/axes';
@@ -25,7 +25,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
25
25
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
26
26
  PERFORMANCE OF THIS SOFTWARE.
27
27
  ***************************************************************************** */
28
- /* global Reflect, Promise, SuppressedError, Symbol */
28
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
29
29
 
30
30
  var extendStatics = function (d, b) {
31
31
  extendStatics = Object.setPrototypeOf || {
@@ -95,12 +95,8 @@ function __generator(thisArg, body) {
95
95
  f,
96
96
  y,
97
97
  t,
98
- g;
99
- return g = {
100
- next: verb(0),
101
- "throw": verb(1),
102
- "return": verb(2)
103
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
98
+ g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
99
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
104
100
  return this;
105
101
  }), g;
106
102
  function verb(n) {
@@ -2815,7 +2811,6 @@ var Control = /*#__PURE__*/function () {
2815
2811
  });
2816
2812
  });
2817
2813
  };
2818
-
2819
2814
  __proto._getPosition = function (panel, direction) {
2820
2815
  if (direction === void 0) {
2821
2816
  direction = DIRECTION.NONE;
@@ -5128,7 +5123,6 @@ var VanillaRenderer = /*#__PURE__*/function (_super) {
5128
5123
  });
5129
5124
  });
5130
5125
  };
5131
-
5132
5126
  __proto._collectPanels = function () {
5133
5127
  var flicking = getFlickingAttached(this._flicking);
5134
5128
  var camera = flicking.camera;
@@ -7850,7 +7844,6 @@ var Flicking = /*#__PURE__*/function (_super) {
7850
7844
  if (!this._initialized) {
7851
7845
  return [2 /*return*/];
7852
7846
  }
7853
-
7854
7847
  renderer.updatePanelSize();
7855
7848
  camera.updateAlignPos();
7856
7849
  camera.updateRange();
@@ -7864,7 +7857,6 @@ var Flicking = /*#__PURE__*/function (_super) {
7864
7857
  if (!this._initialized) {
7865
7858
  return [2 /*return*/];
7866
7859
  }
7867
-
7868
7860
  if (control.animating) ; else {
7869
7861
  control.updatePosition(prevProgressInPanel);
7870
7862
  control.updateInput();
@@ -8102,7 +8094,7 @@ var Flicking = /*#__PURE__*/function (_super) {
8102
8094
  * Flicking.VERSION; // ex) 4.0.0
8103
8095
  * ```
8104
8096
  */
8105
- Flicking.VERSION = "4.14.1-beta.0";
8097
+ Flicking.VERSION = "4.14.1-beta.3";
8106
8098
  return Flicking;
8107
8099
  }(Component);
8108
8100
 
@@ -8576,6 +8568,16 @@ var sync = (function (flicking, diffResult, rendered) {
8576
8568
  }
8577
8569
  if (diffResult.added.length > 0 || diffResult.removed.length > 0) {
8578
8570
  renderer.updateAfterPanelChange(added, removed);
8571
+ } else if (diffResult.ordered.length > 0) {
8572
+ var camera = flicking.camera;
8573
+ // 순서 변경으로 인한 index 변경 및 range 값 변경
8574
+ camera.updateRange();
8575
+ // index 변경으로 인한 카메라 위치 즉시 변경
8576
+ camera.updateOffset();
8577
+ // 순서 변경으로 인한 anchors 전부 업데이트
8578
+ camera.updateAnchors();
8579
+ // need panel 여부 재확인 필요
8580
+ camera.resetNeedPanelHistory();
8579
8581
  }
8580
8582
  });
8581
8583
  var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) {