@egjs/flicking 4.12.0-beta.11 → 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.11
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.11
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;
@@ -13049,7 +13052,7 @@ version: 4.12.0-beta.11
13049
13052
  * Flicking.VERSION; // ex) 4.0.0
13050
13053
  * ```
13051
13054
  */
13052
- Flicking.VERSION = "4.12.0-beta.11";
13055
+ Flicking.VERSION = "4.12.0-beta.12";
13053
13056
  return Flicking;
13054
13057
  }(Component);
13055
13058
 
@@ -13120,6 +13123,9 @@ version: 4.12.0-beta.11
13120
13123
  }
13121
13124
  });
13122
13125
  };
13126
+ _this._addSideIndex = function (e) {
13127
+ e.sideIndex = _this._sideFlicking[e.index].index;
13128
+ };
13123
13129
  _this._onHorizontalHoldStart = function () {
13124
13130
  _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
13125
13131
  _this._moveDirection = null;
@@ -13196,6 +13202,15 @@ version: 4.12.0-beta.11
13196
13202
  enumerable: false,
13197
13203
  configurable: true
13198
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
+ });
13199
13214
  Object.defineProperty(__proto, "sideState", {
13200
13215
  get: function () {
13201
13216
  return this._sideState;
@@ -13264,6 +13279,9 @@ version: 4.12.0-beta.11
13264
13279
  this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
13265
13280
  this.on(EVENTS.MOVE, this._onHorizontalMove);
13266
13281
  this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
13282
+ [EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach(function (event) {
13283
+ _this.on(event, _this._addSideIndex);
13284
+ });
13267
13285
  this._sideFlicking.forEach(function (flicking, mainIndex) {
13268
13286
  flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
13269
13287
  flicking.on(EVENTS.MOVE, _this._onSideMove);