@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
  import Component, { ComponentEvent } from '@egjs/component';
10
10
  import Axes, { PanInput } from '@egjs/axes';
@@ -677,6 +677,9 @@ var getStyle = function (el) {
677
677
  var setSize = function (el, _a) {
678
678
  var width = _a.width,
679
679
  height = _a.height;
680
+ if (!el) {
681
+ return;
682
+ }
680
683
  if (width != null) {
681
684
  if (isString(width)) {
682
685
  el.style.width = width;
@@ -7916,7 +7919,7 @@ var Flicking = /*#__PURE__*/function (_super) {
7916
7919
  * Flicking.VERSION; // ex) 4.0.0
7917
7920
  * ```
7918
7921
  */
7919
- Flicking.VERSION = "4.12.0-beta.11";
7922
+ Flicking.VERSION = "4.12.0-beta.12";
7920
7923
  return Flicking;
7921
7924
  }(Component);
7922
7925
 
@@ -7987,6 +7990,9 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
7987
7990
  }
7988
7991
  });
7989
7992
  };
7993
+ _this._addSideIndex = function (e) {
7994
+ e.sideIndex = _this._sideFlicking[e.index].index;
7995
+ };
7990
7996
  _this._onHorizontalHoldStart = function () {
7991
7997
  _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
7992
7998
  _this._moveDirection = null;
@@ -8063,6 +8069,15 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
8063
8069
  enumerable: false,
8064
8070
  configurable: true
8065
8071
  });
8072
+ Object.defineProperty(__proto, "sideIndex", {
8073
+ get: function () {
8074
+ return this._sideFlicking.map(function (i) {
8075
+ return i.index;
8076
+ });
8077
+ },
8078
+ enumerable: false,
8079
+ configurable: true
8080
+ });
8066
8081
  Object.defineProperty(__proto, "sideState", {
8067
8082
  get: function () {
8068
8083
  return this._sideState;
@@ -8131,6 +8146,9 @@ var CrossFlicking = /*#__PURE__*/function (_super) {
8131
8146
  this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
8132
8147
  this.on(EVENTS.MOVE, this._onHorizontalMove);
8133
8148
  this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
8149
+ [EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach(function (event) {
8150
+ _this.on(event, _this._addSideIndex);
8151
+ });
8134
8152
  this._sideFlicking.forEach(function (flicking, mainIndex) {
8135
8153
  flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
8136
8154
  flicking.on(EVENTS.MOVE, _this._onSideMove);