@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.
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.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(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) :
@@ -692,6 +692,9 @@ version: 4.12.0-beta.10
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;
@@ -1640,6 +1643,9 @@ version: 4.12.0-beta.10
1640
1643
  axesEvent = ctx.axesEvent,
1641
1644
  transitTo = ctx.transitTo;
1642
1645
  var inputEvent = axesEvent.inputEvent;
1646
+ if (!inputEvent) {
1647
+ return;
1648
+ }
1643
1649
  var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY;
1644
1650
  var moveStartEvent = new Component.ComponentEvent(EVENTS.MOVE_START, {
1645
1651
  isTrusted: axesEvent.isTrusted,
@@ -5533,6 +5539,9 @@ version: 4.12.0-beta.10
5533
5539
  var flicking = this._flicking;
5534
5540
  var horizontal = flicking.horizontal,
5535
5541
  useFractionalSize = flicking.useFractionalSize;
5542
+ if (!el) {
5543
+ return this;
5544
+ }
5536
5545
  if (cached) {
5537
5546
  this._size = cached.size;
5538
5547
  this._margin = __assign({}, cached.margin);
@@ -8008,7 +8017,7 @@ version: 4.12.0-beta.10
8008
8017
  * Flicking.VERSION; // ex) 4.0.0
8009
8018
  * ```
8010
8019
  */
8011
- Flicking.VERSION = "4.12.0-beta.10";
8020
+ Flicking.VERSION = "4.12.0-beta.12";
8012
8021
  return Flicking;
8013
8022
  }(Component);
8014
8023
 
@@ -8019,7 +8028,9 @@ version: 4.12.0-beta.10
8019
8028
  MOVE: "sideMove",
8020
8029
  MOVE_END: "sideMoveEnd",
8021
8030
  WILL_CHANGE: "sideWillChange",
8022
- CHANGED: "sideChanged"
8031
+ CHANGED: "sideChanged",
8032
+ WILL_RESTORE: "sideWillRestore",
8033
+ RESTORED: "sideRestored"
8023
8034
  };
8024
8035
  var CrossFlicking = /*#__PURE__*/function (_super) {
8025
8036
  __extends(CrossFlicking, _super);
@@ -8077,6 +8088,9 @@ version: 4.12.0-beta.10
8077
8088
  }
8078
8089
  });
8079
8090
  };
8091
+ _this._addSideIndex = function (e) {
8092
+ e.sideIndex = _this._sideFlicking[e.index].index;
8093
+ };
8080
8094
  _this._onHorizontalHoldStart = function () {
8081
8095
  _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
8082
8096
  _this._moveDirection = null;
@@ -8153,6 +8167,15 @@ version: 4.12.0-beta.10
8153
8167
  enumerable: false,
8154
8168
  configurable: true
8155
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
+ });
8156
8179
  Object.defineProperty(__proto, "sideState", {
8157
8180
  get: function () {
8158
8181
  return this._sideState;
@@ -8221,6 +8244,9 @@ version: 4.12.0-beta.10
8221
8244
  this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
8222
8245
  this.on(EVENTS.MOVE, this._onHorizontalMove);
8223
8246
  this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
8247
+ [EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach(function (event) {
8248
+ _this.on(event, _this._addSideIndex);
8249
+ });
8224
8250
  this._sideFlicking.forEach(function (flicking, mainIndex) {
8225
8251
  flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
8226
8252
  flicking.on(EVENTS.MOVE, _this._onSideMove);