@egjs/flicking 4.6.3 → 4.7.2

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.6.3
7
+ version: 4.7.2
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')) :
@@ -2306,7 +2306,7 @@ version: 4.6.3
2306
2306
  get: function () {
2307
2307
  var _a, _b;
2308
2308
 
2309
- return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnable()) !== null && _b !== void 0 ? _b : false;
2309
+ return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()) !== null && _b !== void 0 ? _b : false;
2310
2310
  },
2311
2311
  enumerable: false,
2312
2312
  configurable: true
@@ -2377,6 +2377,7 @@ version: 4.6.3
2377
2377
  }, _a), {
2378
2378
  deceleration: flicking.deceleration,
2379
2379
  interruptable: flicking.interruptable,
2380
+ nested: flicking.nested,
2380
2381
  easing: flicking.easing
2381
2382
  });
2382
2383
  this._panInput = new Axes.PanInput(flicking.viewport.element, {
@@ -2473,7 +2474,7 @@ version: 4.6.3
2473
2474
  axis.circular = [controlParams.circular, controlParams.circular];
2474
2475
  axis.range = [controlParams.range.min, controlParams.range.max];
2475
2476
  axis.bounce = parseBounce(flicking.bounce, camera.size);
2476
- axes.axm.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a));
2477
+ axes.axisManager.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a));
2477
2478
  return this;
2478
2479
  };
2479
2480
  /**
@@ -2589,7 +2590,7 @@ version: 4.6.3
2589
2590
  var camera = flicking.camera;
2590
2591
  animate();
2591
2592
  var newPos = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position;
2592
- axes.axm.set((_a = {}, _a[POSITION_KEY] = newPos, _a));
2593
+ axes.axisManager.set((_a = {}, _a[POSITION_KEY] = newPos, _a));
2593
2594
  return Promise.resolve();
2594
2595
  } else {
2595
2596
  return new Promise(function (resolve, reject) {
@@ -5400,7 +5401,7 @@ version: 4.6.3
5400
5401
  if (!resizeOnContentsReady || flicking.virtualEnabled) return;
5401
5402
 
5402
5403
  var hasContents = function (panel) {
5403
- return !!panel.element.querySelector("img, video");
5404
+ return panel.element && !!panel.element.querySelector("img, video");
5404
5405
  };
5405
5406
 
5406
5407
  checkingPanels = checkingPanels.filter(function (panel) {
@@ -6724,52 +6725,54 @@ version: 4.6.3
6724
6725
  noPanelStyleOverride = _l === void 0 ? false : _l,
6725
6726
  _m = _b.resizeOnContentsReady,
6726
6727
  resizeOnContentsReady = _m === void 0 ? false : _m,
6727
- _o = _b.needPanelThreshold,
6728
- needPanelThreshold = _o === void 0 ? 0 : _o,
6729
- _p = _b.preventEventsBeforeInit,
6730
- preventEventsBeforeInit = _p === void 0 ? true : _p,
6731
- _q = _b.deceleration,
6732
- deceleration = _q === void 0 ? 0.0075 : _q,
6733
- _r = _b.duration,
6734
- duration = _r === void 0 ? 500 : _r,
6735
- _s = _b.easing,
6736
- easing = _s === void 0 ? function (x) {
6728
+ _o = _b.nested,
6729
+ nested = _o === void 0 ? false : _o,
6730
+ _p = _b.needPanelThreshold,
6731
+ needPanelThreshold = _p === void 0 ? 0 : _p,
6732
+ _q = _b.preventEventsBeforeInit,
6733
+ preventEventsBeforeInit = _q === void 0 ? true : _q,
6734
+ _r = _b.deceleration,
6735
+ deceleration = _r === void 0 ? 0.0075 : _r,
6736
+ _s = _b.duration,
6737
+ duration = _s === void 0 ? 500 : _s,
6738
+ _t = _b.easing,
6739
+ easing = _t === void 0 ? function (x) {
6737
6740
  return 1 - Math.pow(1 - x, 3);
6738
- } : _s,
6739
- _t = _b.inputType,
6740
- inputType = _t === void 0 ? ["mouse", "touch"] : _t,
6741
- _u = _b.moveType,
6742
- moveType = _u === void 0 ? "snap" : _u,
6743
- _v = _b.threshold,
6744
- threshold = _v === void 0 ? 40 : _v,
6745
- _w = _b.interruptable,
6746
- interruptable = _w === void 0 ? true : _w,
6747
- _x = _b.bounce,
6748
- bounce = _x === void 0 ? "20%" : _x,
6749
- _y = _b.iOSEdgeSwipeThreshold,
6750
- iOSEdgeSwipeThreshold = _y === void 0 ? 30 : _y,
6751
- _z = _b.preventClickOnDrag,
6752
- preventClickOnDrag = _z === void 0 ? true : _z,
6753
- _0 = _b.disableOnInit,
6754
- disableOnInit = _0 === void 0 ? false : _0,
6755
- _1 = _b.renderOnlyVisible,
6756
- renderOnlyVisible = _1 === void 0 ? false : _1,
6757
- _2 = _b.virtual,
6758
- virtual = _2 === void 0 ? null : _2,
6759
- _3 = _b.autoInit,
6760
- autoInit = _3 === void 0 ? true : _3,
6761
- _4 = _b.autoResize,
6762
- autoResize = _4 === void 0 ? true : _4,
6763
- _5 = _b.useResizeObserver,
6764
- useResizeObserver = _5 === void 0 ? true : _5,
6765
- _6 = _b.resizeDebounce,
6766
- resizeDebounce = _6 === void 0 ? 0 : _6,
6767
- _7 = _b.maxResizeDebounce,
6768
- maxResizeDebounce = _7 === void 0 ? 100 : _7,
6769
- _8 = _b.externalRenderer,
6770
- externalRenderer = _8 === void 0 ? null : _8,
6771
- _9 = _b.renderExternal,
6772
- renderExternal = _9 === void 0 ? null : _9;
6741
+ } : _t,
6742
+ _u = _b.inputType,
6743
+ inputType = _u === void 0 ? ["mouse", "touch"] : _u,
6744
+ _v = _b.moveType,
6745
+ moveType = _v === void 0 ? "snap" : _v,
6746
+ _w = _b.threshold,
6747
+ threshold = _w === void 0 ? 40 : _w,
6748
+ _x = _b.interruptable,
6749
+ interruptable = _x === void 0 ? true : _x,
6750
+ _y = _b.bounce,
6751
+ bounce = _y === void 0 ? "20%" : _y,
6752
+ _z = _b.iOSEdgeSwipeThreshold,
6753
+ iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z,
6754
+ _0 = _b.preventClickOnDrag,
6755
+ preventClickOnDrag = _0 === void 0 ? true : _0,
6756
+ _1 = _b.disableOnInit,
6757
+ disableOnInit = _1 === void 0 ? false : _1,
6758
+ _2 = _b.renderOnlyVisible,
6759
+ renderOnlyVisible = _2 === void 0 ? false : _2,
6760
+ _3 = _b.virtual,
6761
+ virtual = _3 === void 0 ? null : _3,
6762
+ _4 = _b.autoInit,
6763
+ autoInit = _4 === void 0 ? true : _4,
6764
+ _5 = _b.autoResize,
6765
+ autoResize = _5 === void 0 ? true : _5,
6766
+ _6 = _b.useResizeObserver,
6767
+ useResizeObserver = _6 === void 0 ? true : _6,
6768
+ _7 = _b.resizeDebounce,
6769
+ resizeDebounce = _7 === void 0 ? 0 : _7,
6770
+ _8 = _b.maxResizeDebounce,
6771
+ maxResizeDebounce = _8 === void 0 ? 100 : _8,
6772
+ _9 = _b.externalRenderer,
6773
+ externalRenderer = _9 === void 0 ? null : _9,
6774
+ _10 = _b.renderExternal,
6775
+ renderExternal = _10 === void 0 ? null : _10;
6773
6776
 
6774
6777
  var _this = _super.call(this) || this; // Internal states
6775
6778
 
@@ -6787,6 +6790,7 @@ version: 4.6.3
6787
6790
  _this._panelsPerView = panelsPerView;
6788
6791
  _this._noPanelStyleOverride = noPanelStyleOverride;
6789
6792
  _this._resizeOnContentsReady = resizeOnContentsReady;
6793
+ _this._nested = nested;
6790
6794
  _this._virtual = virtual;
6791
6795
  _this._needPanelThreshold = needPanelThreshold;
6792
6796
  _this._preventEventsBeforeInit = preventEventsBeforeInit;
@@ -7260,6 +7264,24 @@ version: 4.6.3
7260
7264
  enumerable: false,
7261
7265
  configurable: true
7262
7266
  });
7267
+ Object.defineProperty(__proto, "nested", {
7268
+ /**
7269
+ * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.
7270
+ * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.
7271
+ * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.
7272
+ * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.
7273
+ * @type {boolean}
7274
+ * @default false
7275
+ */
7276
+ get: function () {
7277
+ return this._nested;
7278
+ },
7279
+ set: function (val) {
7280
+ this._nested = val;
7281
+ },
7282
+ enumerable: false,
7283
+ configurable: true
7284
+ });
7263
7285
  Object.defineProperty(__proto, "needPanelThreshold", {
7264
7286
  // EVENTS
7265
7287
 
@@ -8496,7 +8518,7 @@ version: 4.6.3
8496
8518
  */
8497
8519
 
8498
8520
 
8499
- Flicking.VERSION = "4.6.3";
8521
+ Flicking.VERSION = "4.7.2";
8500
8522
  return Flicking;
8501
8523
  }(Component);
8502
8524