@egjs/flicking 4.10.0 → 4.10.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.10.0
7
+ version: 4.10.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')) :
@@ -2252,10 +2252,10 @@ version: 4.10.0
2252
2252
  var __proto = AxesController.prototype;
2253
2253
  Object.defineProperty(__proto, "axes", {
2254
2254
  /**
2255
- * An {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance
2256
- * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes}의 인스턴스
2257
- * @type {Axes}
2258
- * @see https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html
2255
+ * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance
2256
+ * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스
2257
+ * @type {Axes | null}
2258
+ * @see https://naver.github.io/egjs-axes/docs/api/Axes
2259
2259
  * @readonly
2260
2260
  */
2261
2261
  get: function () {
@@ -2264,6 +2264,20 @@ version: 4.10.0
2264
2264
  enumerable: false,
2265
2265
  configurable: true
2266
2266
  });
2267
+ Object.defineProperty(__proto, "panInput", {
2268
+ /**
2269
+ * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance
2270
+ * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스
2271
+ * @type {PanInput | null}
2272
+ * @see https://naver.github.io/egjs-axes/docs/api/PanInput
2273
+ * @readonly
2274
+ */
2275
+ get: function () {
2276
+ return this._panInput;
2277
+ },
2278
+ enumerable: false,
2279
+ configurable: true
2280
+ });
2267
2281
  Object.defineProperty(__proto, "stateMachine", {
2268
2282
  /**
2269
2283
  * @internal
@@ -2421,6 +2435,7 @@ version: 4.10.0
2421
2435
  });
2422
2436
  this._panInput = new Axes.PanInput(flicking.viewport.element, {
2423
2437
  inputType: flicking.inputType,
2438
+ threshold: 1,
2424
2439
  iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
2425
2440
  scale: flicking.horizontal ? [-1, 0] : [0, -1],
2426
2441
  releaseOnScroll: true
@@ -2702,6 +2717,15 @@ version: 4.10.0
2702
2717
  }
2703
2718
  };
2704
2719
 
2720
+ __proto.updateDirection = function () {
2721
+ var flicking = getFlickingAttached(this._flicking);
2722
+ var axes = this._axes;
2723
+ var panInput = this._panInput;
2724
+ axes.disconnect(panInput);
2725
+ axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput);
2726
+ panInput.options.scale = flicking.horizontal ? [-1, 0] : [0, -1];
2727
+ };
2728
+
2705
2729
  __proto._resetInternalValues = function () {
2706
2730
  this._flicking = null;
2707
2731
  this._axes = null;
@@ -3048,6 +3072,16 @@ version: 4.10.0
3048
3072
  }));
3049
3073
  }
3050
3074
  };
3075
+ /**
3076
+ * @internal
3077
+ */
3078
+
3079
+
3080
+ __proto.copy = function (control) {
3081
+ this._flicking = control._flicking;
3082
+ this._activePanel = control._activePanel;
3083
+ this._controller = control._controller;
3084
+ };
3051
3085
 
3052
3086
  __proto._triggerIndexChangeEvent = function (panel, position, axesEvent) {
3053
3087
  var _a;
@@ -4895,13 +4929,9 @@ version: 4.10.0
4895
4929
  this._updateMode();
4896
4930
 
4897
4931
  this._range = this._mode.getRange();
4898
-
4899
- if (this._circularEnabled) {
4900
- panels.forEach(function (panel) {
4901
- return panel.updateCircularToggleDirection();
4902
- });
4903
- }
4904
-
4932
+ panels.forEach(function (panel) {
4933
+ return panel.updateCircularToggleDirection();
4934
+ });
4905
4935
  return this;
4906
4936
  };
4907
4937
  /**
@@ -5138,6 +5168,7 @@ version: 4.10.0
5138
5168
  this._circularEnabled = canSetCircularMode;
5139
5169
  } else {
5140
5170
  this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking);
5171
+ this._circularEnabled = false;
5141
5172
  }
5142
5173
  };
5143
5174
 
@@ -6179,6 +6210,8 @@ version: 4.10.0
6179
6210
  // Options Setter
6180
6211
  set: function (val) {
6181
6212
  this._align = val;
6213
+
6214
+ this._updateAlignPos();
6182
6215
  },
6183
6216
  enumerable: false,
6184
6217
  configurable: true
@@ -6473,6 +6506,7 @@ version: 4.10.0
6473
6506
 
6474
6507
  if (!flicking.circularEnabled) {
6475
6508
  this._toggleDirection = DIRECTION.NONE;
6509
+ this._togglePosition = 0;
6476
6510
  this._toggled = false;
6477
6511
  return this;
6478
6512
  }
@@ -7306,6 +7340,7 @@ version: 4.10.0
7306
7340
  this._align = val;
7307
7341
  this._renderer.align = val;
7308
7342
  this._camera.align = val;
7343
+ void this.resize();
7309
7344
  },
7310
7345
  enumerable: false,
7311
7346
  configurable: true
@@ -7338,6 +7373,10 @@ version: 4.10.0
7338
7373
  },
7339
7374
  set: function (val) {
7340
7375
  this._horizontal = val;
7376
+
7377
+ this._control.controller.updateDirection();
7378
+
7379
+ void this.resize();
7341
7380
  },
7342
7381
  enumerable: false,
7343
7382
  configurable: true
@@ -7354,6 +7393,7 @@ version: 4.10.0
7354
7393
  },
7355
7394
  set: function (val) {
7356
7395
  this._circular = val;
7396
+ void this.resize();
7357
7397
  },
7358
7398
  enumerable: false,
7359
7399
  configurable: true
@@ -7390,6 +7430,7 @@ version: 4.10.0
7390
7430
  },
7391
7431
  set: function (val) {
7392
7432
  this._bound = val;
7433
+ void this.resize();
7393
7434
  },
7394
7435
  enumerable: false,
7395
7436
  configurable: true
@@ -7406,6 +7447,7 @@ version: 4.10.0
7406
7447
  },
7407
7448
  set: function (val) {
7408
7449
  this._adaptive = val;
7450
+ void this.resize();
7409
7451
  },
7410
7452
  enumerable: false,
7411
7453
  configurable: true
@@ -7422,6 +7464,7 @@ version: 4.10.0
7422
7464
  },
7423
7465
  set: function (val) {
7424
7466
  this._panelsPerView = val;
7467
+ void this.resize();
7425
7468
  },
7426
7469
  enumerable: false,
7427
7470
  configurable: true
@@ -7440,6 +7483,7 @@ version: 4.10.0
7440
7483
  },
7441
7484
  set: function (val) {
7442
7485
  this._noPanelStyleOverride = val;
7486
+ void this.resize();
7443
7487
  },
7444
7488
  enumerable: false,
7445
7489
  configurable: true
@@ -7458,6 +7502,10 @@ version: 4.10.0
7458
7502
  },
7459
7503
  set: function (val) {
7460
7504
  this._resizeOnContentsReady = val;
7505
+
7506
+ if (val) {
7507
+ this._renderer.checkPanelContentsReady(this._renderer.panels);
7508
+ }
7461
7509
  },
7462
7510
  enumerable: false,
7463
7511
  configurable: true
@@ -7476,6 +7524,11 @@ version: 4.10.0
7476
7524
  },
7477
7525
  set: function (val) {
7478
7526
  this._nested = val;
7527
+ var axes = this._control.controller.axes;
7528
+
7529
+ if (axes) {
7530
+ axes.options.nested = val;
7531
+ }
7479
7532
  },
7480
7533
  enumerable: false,
7481
7534
  configurable: true
@@ -7530,6 +7583,11 @@ version: 4.10.0
7530
7583
  // ANIMATION
7531
7584
  set: function (val) {
7532
7585
  this._deceleration = val;
7586
+ var axes = this._control.controller.axes;
7587
+
7588
+ if (axes) {
7589
+ axes.options.deceleration = val;
7590
+ }
7533
7591
  },
7534
7592
  enumerable: false,
7535
7593
  configurable: true
@@ -7547,6 +7605,11 @@ version: 4.10.0
7547
7605
  },
7548
7606
  set: function (val) {
7549
7607
  this._easing = val;
7608
+ var axes = this._control.controller.axes;
7609
+
7610
+ if (axes) {
7611
+ axes.options.easing = val;
7612
+ }
7550
7613
  },
7551
7614
  enumerable: false,
7552
7615
  configurable: true
@@ -7584,6 +7647,11 @@ version: 4.10.0
7584
7647
  // INPUT
7585
7648
  set: function (val) {
7586
7649
  this._inputType = val;
7650
+ var panInput = this._control.controller.panInput;
7651
+
7652
+ if (panInput) {
7653
+ panInput.options.inputType = val;
7654
+ }
7587
7655
  },
7588
7656
  enumerable: false,
7589
7657
  configurable: true
@@ -7624,6 +7692,18 @@ version: 4.10.0
7624
7692
  },
7625
7693
  set: function (val) {
7626
7694
  this._moveType = val;
7695
+ var prevControl = this._control;
7696
+
7697
+ var newControl = this._createControl();
7698
+
7699
+ var activePanel = prevControl.activePanel;
7700
+ newControl.copy(prevControl);
7701
+ var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0;
7702
+ this._control = newControl;
7703
+
7704
+ this._control.updatePosition(prevProgressInPanel);
7705
+
7706
+ this._control.updateInput();
7627
7707
  },
7628
7708
  enumerable: false,
7629
7709
  configurable: true
@@ -7656,6 +7736,11 @@ version: 4.10.0
7656
7736
  },
7657
7737
  set: function (val) {
7658
7738
  this._interruptable = val;
7739
+ var axes = this._control.controller.axes;
7740
+
7741
+ if (axes) {
7742
+ axes.options.interruptable = val;
7743
+ }
7659
7744
  },
7660
7745
  enumerable: false,
7661
7746
  configurable: true
@@ -7697,6 +7782,8 @@ version: 4.10.0
7697
7782
  },
7698
7783
  set: function (val) {
7699
7784
  this._bounce = val;
7785
+
7786
+ this._control.updateInput();
7700
7787
  },
7701
7788
  enumerable: false,
7702
7789
  configurable: true
@@ -7713,6 +7800,11 @@ version: 4.10.0
7713
7800
  },
7714
7801
  set: function (val) {
7715
7802
  this._iOSEdgeSwipeThreshold = val;
7803
+ var panInput = this._control.controller.panInput;
7804
+
7805
+ if (panInput) {
7806
+ panInput.options.iOSEdgeSwipeThreshold = val;
7807
+ }
7716
7808
  },
7717
7809
  enumerable: false,
7718
7810
  configurable: true
@@ -7792,6 +7884,7 @@ version: 4.10.0
7792
7884
  // PERFORMANCE
7793
7885
  set: function (val) {
7794
7886
  this._renderOnlyVisible = val;
7887
+ void this._renderer.render();
7795
7888
  },
7796
7889
  enumerable: false,
7797
7890
  configurable: true
@@ -8801,7 +8894,7 @@ version: 4.10.0
8801
8894
  */
8802
8895
 
8803
8896
 
8804
- Flicking.VERSION = "4.10.0";
8897
+ Flicking.VERSION = "4.10.2";
8805
8898
  return Flicking;
8806
8899
  }(Component);
8807
8900