@egjs/flicking 4.12.0-beta.10 → 4.12.0-beta.12

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.10
7
+ version: 4.12.0-beta.12
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -1099,6 +1099,9 @@ version: 4.12.0-beta.10
1099
1099
  var setSize = function (el, _a) {
1100
1100
  var width = _a.width,
1101
1101
  height = _a.height;
1102
+ if (!el) {
1103
+ return;
1104
+ }
1102
1105
  if (width != null) {
1103
1106
  if (isString(width)) {
1104
1107
  el.style.width = width;
@@ -5805,6 +5808,9 @@ version: 4.12.0-beta.10
5805
5808
  axesEvent = ctx.axesEvent,
5806
5809
  transitTo = ctx.transitTo;
5807
5810
  var inputEvent = axesEvent.inputEvent;
5811
+ if (!inputEvent) {
5812
+ return;
5813
+ }
5808
5814
  var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY;
5809
5815
  var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
5810
5816
  isTrusted: axesEvent.isTrusted,
@@ -10568,6 +10574,9 @@ version: 4.12.0-beta.10
10568
10574
  var flicking = this._flicking;
10569
10575
  var horizontal = flicking.horizontal,
10570
10576
  useFractionalSize = flicking.useFractionalSize;
10577
+ if (!el) {
10578
+ return this;
10579
+ }
10571
10580
  if (cached) {
10572
10581
  this._size = cached.size;
10573
10582
  this._margin = __assign$2({}, cached.margin);
@@ -13043,7 +13052,7 @@ version: 4.12.0-beta.10
13043
13052
  * Flicking.VERSION; // ex) 4.0.0
13044
13053
  * ```
13045
13054
  */
13046
- Flicking.VERSION = "4.12.0-beta.10";
13055
+ Flicking.VERSION = "4.12.0-beta.12";
13047
13056
  return Flicking;
13048
13057
  }(Component);
13049
13058
 
@@ -13054,7 +13063,9 @@ version: 4.12.0-beta.10
13054
13063
  MOVE: "sideMove",
13055
13064
  MOVE_END: "sideMoveEnd",
13056
13065
  WILL_CHANGE: "sideWillChange",
13057
- CHANGED: "sideChanged"
13066
+ CHANGED: "sideChanged",
13067
+ WILL_RESTORE: "sideWillRestore",
13068
+ RESTORED: "sideRestored"
13058
13069
  };
13059
13070
  var CrossFlicking = /*#__PURE__*/function (_super) {
13060
13071
  __extends$3(CrossFlicking, _super);
@@ -13112,6 +13123,9 @@ version: 4.12.0-beta.10
13112
13123
  }
13113
13124
  });
13114
13125
  };
13126
+ _this._addSideIndex = function (e) {
13127
+ e.sideIndex = _this._sideFlicking[e.index].index;
13128
+ };
13115
13129
  _this._onHorizontalHoldStart = function () {
13116
13130
  _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
13117
13131
  _this._moveDirection = null;
@@ -13188,6 +13202,15 @@ version: 4.12.0-beta.10
13188
13202
  enumerable: false,
13189
13203
  configurable: true
13190
13204
  });
13205
+ Object.defineProperty(__proto, "sideIndex", {
13206
+ get: function () {
13207
+ return this._sideFlicking.map(function (i) {
13208
+ return i.index;
13209
+ });
13210
+ },
13211
+ enumerable: false,
13212
+ configurable: true
13213
+ });
13191
13214
  Object.defineProperty(__proto, "sideState", {
13192
13215
  get: function () {
13193
13216
  return this._sideState;
@@ -13256,6 +13279,9 @@ version: 4.12.0-beta.10
13256
13279
  this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
13257
13280
  this.on(EVENTS.MOVE, this._onHorizontalMove);
13258
13281
  this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
13282
+ [EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach(function (event) {
13283
+ _this.on(event, _this._addSideIndex);
13284
+ });
13259
13285
  this._sideFlicking.forEach(function (flicking, mainIndex) {
13260
13286
  flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
13261
13287
  flicking.on(EVENTS.MOVE, _this._onSideMove);