@egjs/flicking 4.13.1 → 4.13.2-beta.1

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.13.1
7
+ version: 4.13.2-beta.1
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -2779,7 +2779,7 @@ version: 4.13.1
2779
2779
  license: MIT
2780
2780
  author: NAVER Corp.
2781
2781
  repository: https://github.com/naver/egjs-axes
2782
- version: 3.9.1
2782
+ version: 3.9.2
2783
2783
  */
2784
2784
 
2785
2785
  /*! *****************************************************************************
@@ -3705,6 +3705,19 @@ version: 4.13.1
3705
3705
  var deltaTime = latestInterval ? timeStamp - latestInterval.timestamp : 0;
3706
3706
  var velocityX = prevEvent ? prevEvent.velocityX : 0;
3707
3707
  var velocityY = prevEvent ? prevEvent.velocityY : 0;
3708
+ var directionX = prevEvent ? prevEvent.directionX : 1;
3709
+ var directionY = prevEvent ? prevEvent.directionY : 1;
3710
+ // If offset is 0, it inherits the direction of the previous event.
3711
+ if (offsetX > 0) {
3712
+ directionX = 1;
3713
+ } else if (offsetX < 0) {
3714
+ directionX = -1;
3715
+ }
3716
+ if (offsetY > 0) {
3717
+ directionY = 1;
3718
+ } else if (offsetY < 0) {
3719
+ directionY = -1;
3720
+ }
3708
3721
  if (!latestInterval || deltaTime >= VELOCITY_INTERVAL) {
3709
3722
  if (latestInterval) {
3710
3723
  _a = [(deltaX - latestInterval.deltaX) / deltaTime, (deltaY - latestInterval.deltaY) / deltaTime], velocityX = _a[0], velocityY = _a[1];
@@ -3724,6 +3737,8 @@ version: 4.13.1
3724
3737
  deltaY: deltaY,
3725
3738
  offsetX: offsetX,
3726
3739
  offsetY: offsetY,
3740
+ directionX: directionX,
3741
+ directionY: directionY,
3727
3742
  velocityX: velocityX,
3728
3743
  velocityY: velocityY,
3729
3744
  preventSystemEvent: true
@@ -5187,7 +5202,7 @@ version: 4.13.1
5187
5202
  * eg.Axes.VERSION; // ex) 3.3.3
5188
5203
  * ```
5189
5204
  */
5190
- Axes.VERSION = "3.9.1";
5205
+ Axes.VERSION = "3.9.2";
5191
5206
  /* eslint-enable */
5192
5207
  /**
5193
5208
  * @name TRANSFORM
@@ -5538,7 +5553,7 @@ version: 4.13.1
5538
5553
  this._detachWindowEvent(activeEvent);
5539
5554
  clearTimeout(this._rightEdgeTimer);
5540
5555
  var prevEvent = activeEvent.prevEvent;
5541
- 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];
5556
+ 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];
5542
5557
  activeEvent.onRelease();
5543
5558
  this._observer.release(this, prevEvent, velocity);
5544
5559
  };
@@ -13231,7 +13246,7 @@ version: 4.13.1
13231
13246
  * Flicking.VERSION; // ex) 4.0.0
13232
13247
  * ```
13233
13248
  */
13234
- Flicking.VERSION = "4.13.1";
13249
+ Flicking.VERSION = "4.13.2-beta.1";
13235
13250
  return Flicking;
13236
13251
  }(Component);
13237
13252