@egjs/flicking 4.10.8 → 4.11.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.10.8
7
+ version: 4.11.0
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -2641,7 +2641,7 @@ version: 4.10.8
2641
2641
  license: MIT
2642
2642
  author: NAVER Corp.
2643
2643
  repository: https://github.com/naver/egjs-axes
2644
- version: 3.8.4
2644
+ version: 3.9.0
2645
2645
  */
2646
2646
 
2647
2647
  /*! *****************************************************************************
@@ -4346,6 +4346,9 @@ version: 4.10.8
4346
4346
  return v + pos[k];
4347
4347
  }), duration);
4348
4348
  };
4349
+ __proto.setOptions = function (options) {
4350
+ this._options = __assign$1(__assign$1({}, this._options), options);
4351
+ };
4349
4352
  __proto._createAnimationParam = function (pos, duration, option) {
4350
4353
  var depaPos = this.axisManager.get();
4351
4354
  var destPos = pos;
@@ -4908,6 +4911,7 @@ version: 4.10.8
4908
4911
  */
4909
4912
  __proto.setOptions = function (options) {
4910
4913
  this.options = __assign$1(__assign$1({}, this.options), options);
4914
+ this.animationManager.setOptions(options);
4911
4915
  return this;
4912
4916
  };
4913
4917
  /**
@@ -5042,7 +5046,7 @@ version: 4.10.8
5042
5046
  * eg.Axes.VERSION; // ex) 3.3.3
5043
5047
  * ```
5044
5048
  */
5045
- Axes.VERSION = "3.8.4";
5049
+ Axes.VERSION = "3.9.0";
5046
5050
  /* eslint-enable */
5047
5051
  /**
5048
5052
  * @name TRANSFORM
@@ -5158,6 +5162,7 @@ version: 4.10.8
5158
5162
  * @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
5159
5163
  * @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
5160
5164
  * @param {Boolean} [preventClickOnDrag=false] Whether to cancel the {@link https://developer.mozilla.org/en/docs/Web/API/Element/click_event click} event when the user finishes dragging more than 1 pixel <ko>사용자가 1픽셀 이상 드래그를 마쳤을 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트 취소 여부</ko>
5165
+ * @param {Boolean} [preventDefaultOnDrag=false] Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging <ko>사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부</ko>
5161
5166
  * @param {Number} [iOSEdgeSwipeThreshold=30] Area (px) that can go to the next page when swiping the right edge in iOS safari <ko>iOS Safari에서 오른쪽 엣지를 스와이프 하는 경우 다음 페이지로 넘어갈 수 있는 영역(px)</ko>
5162
5167
  * @param {String} [touchAction=null] Value that overrides the element's "touch-action" css property. If set to null, it is automatically set to prevent scrolling in the direction of the connected axis. <ko>엘리먼트의 "touch-action" CSS 속성을 덮어쓰는 값. 만약 null로 설정된 경우, 연결된 축 방향으로의 스크롤을 방지하게끔 자동으로 설정된다.</ko>
5163
5168
  **/
@@ -5216,6 +5221,7 @@ version: 4.10.8
5216
5221
  thresholdAngle: 45,
5217
5222
  threshold: 0,
5218
5223
  preventClickOnDrag: false,
5224
+ preventDefaultOnDrag: false,
5219
5225
  iOSEdgeSwipeThreshold: IOS_EDGE_THRESHOLD,
5220
5226
  releaseOnScroll: false,
5221
5227
  touchAction: null
@@ -5297,7 +5303,8 @@ version: 4.10.8
5297
5303
  __proto._onPanstart = function (event) {
5298
5304
  var _a = this.options,
5299
5305
  inputKey = _a.inputKey,
5300
- inputButton = _a.inputButton;
5306
+ inputButton = _a.inputButton,
5307
+ preventDefaultOnDrag = _a.preventDefaultOnDrag;
5301
5308
  var activeEvent = this._activeEvent;
5302
5309
  var panEvent = activeEvent.onEventStart(event, inputKey, inputButton);
5303
5310
  if (!panEvent || !this._enabled || activeEvent.getTouches(event, inputButton) > 1) {
@@ -5310,6 +5317,7 @@ version: 4.10.8
5310
5317
  this._observer.hold(this, panEvent);
5311
5318
  this._atRightEdge = IS_IOS_SAFARI && panEvent.center.x > window.innerWidth - edgeThreshold;
5312
5319
  this._attachWindowEvent(activeEvent);
5320
+ preventDefaultOnDrag && panEvent.srcEvent.type !== "touchstart" && panEvent.srcEvent.preventDefault();
5313
5321
  activeEvent.prevEvent = panEvent;
5314
5322
  }
5315
5323
  };
@@ -6281,6 +6289,7 @@ version: 4.10.8
6281
6289
  inputType: flicking.inputType,
6282
6290
  threshold: 1,
6283
6291
  iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,
6292
+ preventDefaultOnDrag: flicking.preventDefaultOnDrag,
6284
6293
  scale: flicking.horizontal ? [-1, 0] : [0, -1],
6285
6294
  releaseOnScroll: true
6286
6295
  });
@@ -11077,30 +11086,32 @@ version: 4.10.8
11077
11086
  iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z,
11078
11087
  _0 = _b.preventClickOnDrag,
11079
11088
  preventClickOnDrag = _0 === void 0 ? true : _0,
11080
- _1 = _b.disableOnInit,
11081
- disableOnInit = _1 === void 0 ? false : _1,
11082
- _2 = _b.changeOnHold,
11083
- changeOnHold = _2 === void 0 ? false : _2,
11084
- _3 = _b.renderOnlyVisible,
11085
- renderOnlyVisible = _3 === void 0 ? false : _3,
11086
- _4 = _b.virtual,
11087
- virtual = _4 === void 0 ? null : _4,
11088
- _5 = _b.autoInit,
11089
- autoInit = _5 === void 0 ? true : _5,
11090
- _6 = _b.autoResize,
11091
- autoResize = _6 === void 0 ? true : _6,
11092
- _7 = _b.useResizeObserver,
11093
- useResizeObserver = _7 === void 0 ? true : _7,
11094
- _8 = _b.resizeDebounce,
11095
- resizeDebounce = _8 === void 0 ? 0 : _8,
11096
- _9 = _b.maxResizeDebounce,
11097
- maxResizeDebounce = _9 === void 0 ? 100 : _9,
11098
- _10 = _b.useFractionalSize,
11099
- useFractionalSize = _10 === void 0 ? false : _10,
11100
- _11 = _b.externalRenderer,
11101
- externalRenderer = _11 === void 0 ? null : _11,
11102
- _12 = _b.renderExternal,
11103
- renderExternal = _12 === void 0 ? null : _12;
11089
+ _1 = _b.preventDefaultOnDrag,
11090
+ preventDefaultOnDrag = _1 === void 0 ? false : _1,
11091
+ _2 = _b.disableOnInit,
11092
+ disableOnInit = _2 === void 0 ? false : _2,
11093
+ _3 = _b.changeOnHold,
11094
+ changeOnHold = _3 === void 0 ? false : _3,
11095
+ _4 = _b.renderOnlyVisible,
11096
+ renderOnlyVisible = _4 === void 0 ? false : _4,
11097
+ _5 = _b.virtual,
11098
+ virtual = _5 === void 0 ? null : _5,
11099
+ _6 = _b.autoInit,
11100
+ autoInit = _6 === void 0 ? true : _6,
11101
+ _7 = _b.autoResize,
11102
+ autoResize = _7 === void 0 ? true : _7,
11103
+ _8 = _b.useResizeObserver,
11104
+ useResizeObserver = _8 === void 0 ? true : _8,
11105
+ _9 = _b.resizeDebounce,
11106
+ resizeDebounce = _9 === void 0 ? 0 : _9,
11107
+ _10 = _b.maxResizeDebounce,
11108
+ maxResizeDebounce = _10 === void 0 ? 100 : _10,
11109
+ _11 = _b.useFractionalSize,
11110
+ useFractionalSize = _11 === void 0 ? false : _11,
11111
+ _12 = _b.externalRenderer,
11112
+ externalRenderer = _12 === void 0 ? null : _12,
11113
+ _13 = _b.renderExternal,
11114
+ renderExternal = _13 === void 0 ? null : _13;
11104
11115
  var _this = _super.call(this) || this;
11105
11116
  // Internal states
11106
11117
  _this._initialized = false;
@@ -11130,6 +11141,7 @@ version: 4.10.8
11130
11141
  _this._bounce = bounce;
11131
11142
  _this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;
11132
11143
  _this._preventClickOnDrag = preventClickOnDrag;
11144
+ _this._preventDefaultOnDrag = preventDefaultOnDrag;
11133
11145
  _this._disableOnInit = disableOnInit;
11134
11146
  _this._changeOnHold = changeOnHold;
11135
11147
  _this._renderOnlyVisible = renderOnlyVisible;
@@ -11928,6 +11940,27 @@ version: 4.10.8
11928
11940
  enumerable: false,
11929
11941
  configurable: true
11930
11942
  });
11943
+ Object.defineProperty(__proto, "preventDefaultOnDrag", {
11944
+ /**
11945
+ * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging
11946
+ * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부
11947
+ * @type {boolean}
11948
+ * @default false
11949
+ * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}
11950
+ */
11951
+ get: function () {
11952
+ return this._preventDefaultOnDrag;
11953
+ },
11954
+ set: function (val) {
11955
+ this._preventDefaultOnDrag = val;
11956
+ var panInput = this._control.controller.panInput;
11957
+ if (panInput) {
11958
+ panInput.options.preventDefaultOnDrag = val;
11959
+ }
11960
+ },
11961
+ enumerable: false,
11962
+ configurable: true
11963
+ });
11931
11964
  Object.defineProperty(__proto, "disableOnInit", {
11932
11965
  /**
11933
11966
  * Automatically call {@link Flicking#disableInput disableInput()} on initialization
@@ -12862,7 +12895,7 @@ version: 4.10.8
12862
12895
  * Flicking.VERSION; // ex) 4.0.0
12863
12896
  * ```
12864
12897
  */
12865
- Flicking.VERSION = "4.10.8";
12898
+ Flicking.VERSION = "4.11.0";
12866
12899
  return Flicking;
12867
12900
  }(Component);
12868
12901