@egjs/flicking 4.14.0 → 4.14.1-beta.0

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.14.0
7
+ version: 4.14.1-beta.0
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -3104,7 +3104,7 @@ version: 4.14.0
3104
3104
  license: MIT
3105
3105
  author: NAVER Corp.
3106
3106
  repository: https://github.com/naver/egjs-axes
3107
- version: 3.9.1
3107
+ version: 3.9.2
3108
3108
  */
3109
3109
 
3110
3110
  /*! *****************************************************************************
@@ -4030,6 +4030,19 @@ version: 4.14.0
4030
4030
  var deltaTime = latestInterval ? timeStamp - latestInterval.timestamp : 0;
4031
4031
  var velocityX = prevEvent ? prevEvent.velocityX : 0;
4032
4032
  var velocityY = prevEvent ? prevEvent.velocityY : 0;
4033
+ var directionX = prevEvent ? prevEvent.directionX : 1;
4034
+ var directionY = prevEvent ? prevEvent.directionY : 1;
4035
+ // If offset is 0, it inherits the direction of the previous event.
4036
+ if (offsetX > 0) {
4037
+ directionX = 1;
4038
+ } else if (offsetX < 0) {
4039
+ directionX = -1;
4040
+ }
4041
+ if (offsetY > 0) {
4042
+ directionY = 1;
4043
+ } else if (offsetY < 0) {
4044
+ directionY = -1;
4045
+ }
4033
4046
  if (!latestInterval || deltaTime >= VELOCITY_INTERVAL) {
4034
4047
  if (latestInterval) {
4035
4048
  _a = [(deltaX - latestInterval.deltaX) / deltaTime, (deltaY - latestInterval.deltaY) / deltaTime], velocityX = _a[0], velocityY = _a[1];
@@ -4049,6 +4062,8 @@ version: 4.14.0
4049
4062
  deltaY: deltaY,
4050
4063
  offsetX: offsetX,
4051
4064
  offsetY: offsetY,
4065
+ directionX: directionX,
4066
+ directionY: directionY,
4052
4067
  velocityX: velocityX,
4053
4068
  velocityY: velocityY,
4054
4069
  preventSystemEvent: true
@@ -5512,7 +5527,7 @@ version: 4.14.0
5512
5527
  * eg.Axes.VERSION; // ex) 3.3.3
5513
5528
  * ```
5514
5529
  */
5515
- Axes.VERSION = "3.9.1";
5530
+ Axes.VERSION = "3.9.2";
5516
5531
  /* eslint-enable */
5517
5532
  /**
5518
5533
  * @name TRANSFORM
@@ -5863,7 +5878,7 @@ version: 4.14.0
5863
5878
  this._detachWindowEvent(activeEvent);
5864
5879
  clearTimeout(this._rightEdgeTimer);
5865
5880
  var prevEvent = activeEvent.prevEvent;
5866
- var velocity = this._isOverThreshold ? this._getOffset([Math.abs(prevEvent.velocityX) * (prevEvent.offsetX < 0 ? -1 : 1), Math.abs(prevEvent.velocityY) * (prevEvent.offsetY < 0 ? -1 : 1)], [useDirection(DIRECTION_HORIZONTAL, this._direction), useDirection(DIRECTION_VERTICAL, this._direction)]) : [0, 0];
5881
+ var velocity = this._isOverThreshold ? this._getOffset([Math.abs(prevEvent.velocityX) * prevEvent.directionX, Math.abs(prevEvent.velocityY) * prevEvent.directionY], [useDirection(DIRECTION_HORIZONTAL, this._direction), useDirection(DIRECTION_VERTICAL, this._direction)]) : [0, 0];
5867
5882
  activeEvent.onRelease();
5868
5883
  this._observer.release(this, prevEvent, velocity);
5869
5884
  };
@@ -7336,9 +7351,12 @@ version: 4.14.0
7336
7351
  return __generator(this, function (_a) {
7337
7352
  switch (_a.label) {
7338
7353
  case 0:
7354
+ if (!flicking.initialized) return [3 /*break*/, 2];
7339
7355
  return [4 /*yield*/, flicking.renderer.render()];
7340
7356
  case 1:
7341
7357
  _a.sent();
7358
+ _a.label = 2;
7359
+ case 2:
7342
7360
  return [2 /*return*/];
7343
7361
  }
7344
7362
  });
@@ -13556,7 +13574,7 @@ version: 4.14.0
13556
13574
  * Flicking.VERSION; // ex) 4.0.0
13557
13575
  * ```
13558
13576
  */
13559
- Flicking.VERSION = "4.14.0";
13577
+ Flicking.VERSION = "4.14.1-beta.0";
13560
13578
  return Flicking;
13561
13579
  }(Component);
13562
13580