@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.
package/dist/flicking.js CHANGED
@@ -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(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
@@ -692,6 +692,9 @@ version: 4.12.0-beta.11
692
692
  var setSize = function (el, _a) {
693
693
  var width = _a.width,
694
694
  height = _a.height;
695
+ if (!el) {
696
+ return;
697
+ }
695
698
  if (width != null) {
696
699
  if (isString(width)) {
697
700
  el.style.width = width;
@@ -8014,7 +8017,7 @@ version: 4.12.0-beta.11
8014
8017
  * Flicking.VERSION; // ex) 4.0.0
8015
8018
  * ```
8016
8019
  */
8017
- Flicking.VERSION = "4.12.0-beta.11";
8020
+ Flicking.VERSION = "4.12.0-beta.12";
8018
8021
  return Flicking;
8019
8022
  }(Component);
8020
8023
 
@@ -8085,6 +8088,9 @@ version: 4.12.0-beta.11
8085
8088
  }
8086
8089
  });
8087
8090
  };
8091
+ _this._addSideIndex = function (e) {
8092
+ e.sideIndex = _this._sideFlicking[e.index].index;
8093
+ };
8088
8094
  _this._onHorizontalHoldStart = function () {
8089
8095
  _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
8090
8096
  _this._moveDirection = null;
@@ -8161,6 +8167,15 @@ version: 4.12.0-beta.11
8161
8167
  enumerable: false,
8162
8168
  configurable: true
8163
8169
  });
8170
+ Object.defineProperty(__proto, "sideIndex", {
8171
+ get: function () {
8172
+ return this._sideFlicking.map(function (i) {
8173
+ return i.index;
8174
+ });
8175
+ },
8176
+ enumerable: false,
8177
+ configurable: true
8178
+ });
8164
8179
  Object.defineProperty(__proto, "sideState", {
8165
8180
  get: function () {
8166
8181
  return this._sideState;
@@ -8229,6 +8244,9 @@ version: 4.12.0-beta.11
8229
8244
  this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
8230
8245
  this.on(EVENTS.MOVE, this._onHorizontalMove);
8231
8246
  this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
8247
+ [EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach(function (event) {
8248
+ _this.on(event, _this._addSideIndex);
8249
+ });
8232
8250
  this._sideFlicking.forEach(function (flicking, mainIndex) {
8233
8251
  flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
8234
8252
  flicking.on(EVENTS.MOVE, _this._onSideMove);