@egjs/flicking 4.10.8-beta.1 → 4.10.8

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-beta.1
7
+ version: 4.10.8
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -2658,8 +2658,8 @@ version: 4.10.8-beta.1
2658
2658
  See the Apache Version 2.0 License for specific language governing permissions
2659
2659
  and limitations under the License.
2660
2660
  ***************************************************************************** */
2661
-
2662
2661
  /* global Reflect, Promise */
2662
+
2663
2663
  var extendStatics$1 = function (d, b) {
2664
2664
  extendStatics$1 = Object.setPrototypeOf || {
2665
2665
  __proto__: []
@@ -2668,48 +2668,39 @@ version: 4.10.8-beta.1
2668
2668
  } || function (d, b) {
2669
2669
  for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
2670
2670
  };
2671
-
2672
2671
  return extendStatics$1(d, b);
2673
2672
  };
2674
-
2675
2673
  function __extends$1(d, b) {
2676
2674
  extendStatics$1(d, b);
2677
-
2678
2675
  function __() {
2679
2676
  this.constructor = d;
2680
2677
  }
2681
-
2682
2678
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2683
2679
  }
2684
2680
  var __assign$1 = function () {
2685
2681
  __assign$1 = Object.assign || function __assign(t) {
2686
2682
  for (var s, i = 1, n = arguments.length; i < n; i++) {
2687
2683
  s = arguments[i];
2688
-
2689
2684
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2690
2685
  }
2691
-
2692
2686
  return t;
2693
2687
  };
2694
-
2695
2688
  return __assign$1.apply(this, arguments);
2696
2689
  };
2697
2690
  function __decorate(decorators, target, key, desc) {
2698
2691
  var c = arguments.length,
2699
- r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
2700
- d;
2692
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
2693
+ d;
2701
2694
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
2702
2695
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2703
2696
  }
2704
2697
 
2705
- /*
2706
- * Copyright (c) 2015 NAVER Corp.
2707
- * egjs projects are licensed under the MIT license
2698
+ /*
2699
+ * Copyright (c) 2015 NAVER Corp.
2700
+ * egjs projects are licensed under the MIT license
2708
2701
  */
2709
-
2710
2702
  /* eslint-disable no-new-func, no-nested-ternary */
2711
2703
  var win;
2712
-
2713
2704
  if (typeof window === "undefined") {
2714
2705
  // window is undefined in node.js
2715
2706
  win = {
@@ -2721,9 +2712,9 @@ version: 4.10.8-beta.1
2721
2712
  win = window;
2722
2713
  }
2723
2714
 
2724
- /*
2725
- * Copyright (c) 2015 NAVER Corp.
2726
- * egjs projects are licensed under the MIT license
2715
+ /*
2716
+ * Copyright (c) 2015 NAVER Corp.
2717
+ * egjs projects are licensed under the MIT license
2727
2718
  */
2728
2719
  var DIRECTION_NONE = 1;
2729
2720
  var DIRECTION_LEFT = 2;
@@ -2754,16 +2745,13 @@ version: 4.10.8-beta.1
2754
2745
  if (typeof document === "undefined") {
2755
2746
  return "";
2756
2747
  }
2757
-
2758
2748
  var bodyStyle = (document.head || document.getElementsByTagName("head")[0]).style;
2759
2749
  var target = ["transform", "webkitTransform", "msTransform", "mozTransform"];
2760
-
2761
2750
  for (var i = 0, len = target.length; i < len; i++) {
2762
2751
  if (target[i] in bodyStyle) {
2763
2752
  return target[i];
2764
2753
  }
2765
2754
  }
2766
-
2767
2755
  return "";
2768
2756
  }();
2769
2757
  var PREVENT_DRAG_CSSPROPS = {
@@ -2778,25 +2766,21 @@ version: 4.10.8-beta.1
2778
2766
  // const el = Array.prototype.slice.call(nodes);
2779
2767
  // for IE8
2780
2768
  var el = [];
2781
-
2782
2769
  for (var i = 0, len = nodes.length; i < len; i++) {
2783
2770
  el.push(nodes[i]);
2784
2771
  }
2785
-
2786
2772
  return el;
2787
2773
  };
2788
2774
  var $ = function (param, multi) {
2789
2775
  if (multi === void 0) {
2790
2776
  multi = false;
2791
2777
  }
2792
-
2793
2778
  var el;
2794
-
2795
2779
  if (typeof param === "string") {
2796
2780
  // String (HTML, Selector)
2797
2781
  // check if string is HTML tag format
2798
- var match = param.match(/^<([a-z]+)\s*([^>]*)>/); // creating element
2799
-
2782
+ var match = param.match(/^<([a-z]+)\s*([^>]*)>/);
2783
+ // creating element
2800
2784
  if (match) {
2801
2785
  // HTML
2802
2786
  var dummy = document.createElement("div");
@@ -2806,7 +2790,6 @@ version: 4.10.8-beta.1
2806
2790
  // Selector
2807
2791
  el = toArray$1(document.querySelectorAll(param));
2808
2792
  }
2809
-
2810
2793
  if (!multi) {
2811
2794
  el = el.length >= 1 ? el[0] : undefined;
2812
2795
  }
@@ -2825,33 +2808,27 @@ version: 4.10.8-beta.1
2825
2808
  el = param.map(function (v) {
2826
2809
  return $(v);
2827
2810
  });
2828
-
2829
2811
  if (!multi) {
2830
2812
  el = el.length >= 1 ? el[0] : undefined;
2831
2813
  }
2832
2814
  }
2833
-
2834
2815
  return el;
2835
2816
  };
2836
2817
  var raf = win.requestAnimationFrame || win.webkitRequestAnimationFrame;
2837
2818
  var caf = win.cancelAnimationFrame || win.webkitCancelAnimationFrame;
2838
-
2839
2819
  if (raf && !caf) {
2840
2820
  var keyInfo_1 = {};
2841
2821
  var oldraf_1 = raf;
2842
-
2843
2822
  raf = function (callback) {
2844
2823
  var wrapCallback = function (timestamp) {
2845
2824
  if (keyInfo_1[key]) {
2846
2825
  callback(timestamp);
2847
2826
  }
2848
2827
  };
2849
-
2850
2828
  var key = oldraf_1(wrapCallback);
2851
2829
  keyInfo_1[key] = true;
2852
2830
  return key;
2853
2831
  };
2854
-
2855
2832
  caf = function (key) {
2856
2833
  delete keyInfo_1[key];
2857
2834
  };
@@ -2861,49 +2838,41 @@ version: 4.10.8-beta.1
2861
2838
  callback(win.performance && win.performance.now && win.performance.now() || new Date().getTime());
2862
2839
  }, 16);
2863
2840
  };
2864
-
2865
2841
  caf = win.clearTimeout;
2866
2842
  }
2867
- /**
2868
- * A polyfill for the window.requestAnimationFrame() method.
2869
- * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
2870
- * @private
2843
+ /**
2844
+ * A polyfill for the window.requestAnimationFrame() method.
2845
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
2846
+ * @private
2871
2847
  */
2872
-
2873
-
2874
2848
  var requestAnimationFrame = function (fp) {
2875
2849
  return raf(fp);
2876
2850
  };
2877
- /**
2878
- * A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
2879
- * @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
2880
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
2881
- * @private
2851
+ /**
2852
+ * A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
2853
+ * @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
2854
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
2855
+ * @private
2882
2856
  */
2883
-
2884
2857
  var cancelAnimationFrame = function (key) {
2885
2858
  caf(key);
2886
2859
  };
2887
2860
  var map = function (obj, callback) {
2888
2861
  var tranformed = {};
2889
-
2890
2862
  for (var k in obj) {
2891
2863
  if (k) {
2892
2864
  tranformed[k] = callback(obj[k], k);
2893
2865
  }
2894
2866
  }
2895
-
2896
2867
  return tranformed;
2897
2868
  };
2898
2869
  var filter = function (obj, callback) {
2899
2870
  var filtered = {};
2900
-
2901
2871
  for (var k in obj) {
2902
2872
  if (k && callback(obj[k], k)) {
2903
2873
  filtered[k] = obj[k];
2904
2874
  }
2905
2875
  }
2906
-
2907
2876
  return filtered;
2908
2877
  };
2909
2878
  var every = function (obj, callback) {
@@ -2912,7 +2881,6 @@ version: 4.10.8-beta.1
2912
2881
  return false;
2913
2882
  }
2914
2883
  }
2915
-
2916
2884
  return true;
2917
2885
  };
2918
2886
  var equal = function (target, base) {
@@ -2926,14 +2894,12 @@ version: 4.10.8-beta.1
2926
2894
  if (!roundNumFunc[roundUnit]) {
2927
2895
  roundNumFunc[roundUnit] = getRoundFunc(roundUnit);
2928
2896
  }
2929
-
2930
2897
  return roundNumFunc[roundUnit](num);
2931
2898
  };
2932
2899
  var roundNumbers = function (num, roundUnit) {
2933
2900
  if (!num || !roundUnit) {
2934
2901
  return num;
2935
2902
  }
2936
-
2937
2903
  return map(num, function (value, key) {
2938
2904
  return roundNumber(value, typeof roundUnit === "number" ? roundUnit : roundUnit[key]);
2939
2905
  });
@@ -2942,25 +2908,20 @@ version: 4.10.8-beta.1
2942
2908
  if (!isFinite(val)) {
2943
2909
  return 0;
2944
2910
  }
2945
-
2946
2911
  var v = "".concat(val);
2947
-
2948
2912
  if (v.indexOf("e") >= 0) {
2949
2913
  // Exponential Format
2950
2914
  // 1e-10, 1e-12
2951
2915
  var p = 0;
2952
2916
  var e = 1;
2953
-
2954
2917
  while (Math.round(val * e) / e !== val) {
2955
2918
  e *= 10;
2956
2919
  p++;
2957
2920
  }
2958
-
2959
2921
  return p;
2960
- } // In general, following has performance benefit.
2922
+ }
2923
+ // In general, following has performance benefit.
2961
2924
  // https://jsperf.com/precision-calculation
2962
-
2963
-
2964
2925
  return v.indexOf(".") >= 0 ? v.length - v.indexOf(".") - 1 : 0;
2965
2926
  };
2966
2927
  var inversePow = function (n) {
@@ -2974,7 +2935,6 @@ version: 4.10.8-beta.1
2974
2935
  if (v === 0) {
2975
2936
  return 0;
2976
2937
  }
2977
-
2978
2938
  return Math.round(Math.round(n / v) * v * p) / p;
2979
2939
  };
2980
2940
  };
@@ -3010,23 +2970,18 @@ version: 4.10.8-beta.1
3010
2970
  };
3011
2971
  var setCssProps = function (element, option, direction) {
3012
2972
  var _a;
3013
-
3014
2973
  var touchActionMap = (_a = {}, _a[DIRECTION_NONE] = "auto", _a[DIRECTION_ALL] = "none", _a[DIRECTION_VERTICAL] = "pan-x", _a[DIRECTION_HORIZONTAL] = "pan-y", _a);
3015
2974
  var oldCssProps = {};
3016
-
3017
2975
  if (element && element.style) {
3018
2976
  var touchAction = option.touchAction ? option.touchAction : touchActionMap[direction];
3019
-
3020
2977
  var newCssProps_1 = __assign$1(__assign$1({}, PREVENT_DRAG_CSSPROPS), {
3021
2978
  "touch-action": element.style["touch-action"] === "none" ? "none" : touchAction
3022
2979
  });
3023
-
3024
2980
  Object.keys(newCssProps_1).forEach(function (prop) {
3025
2981
  oldCssProps[prop] = element.style[prop];
3026
2982
  element.style[prop] = newCssProps_1[prop];
3027
2983
  });
3028
2984
  }
3029
-
3030
2985
  return oldCssProps;
3031
2986
  };
3032
2987
  var revertCssProps = function (element, originalCssProps) {
@@ -3035,51 +2990,44 @@ version: 4.10.8-beta.1
3035
2990
  element.style[prop] = originalCssProps[prop];
3036
2991
  });
3037
2992
  }
3038
-
3039
2993
  return;
3040
2994
  };
3041
2995
 
3042
- var EventManager =
3043
- /*#__PURE__*/
3044
- function () {
2996
+ var EventManager = /*#__PURE__*/function () {
3045
2997
  function EventManager(_axes) {
3046
2998
  this._axes = _axes;
3047
2999
  this.holdingCount = 0;
3048
3000
  }
3049
- /**
3050
- * This event is fired when a user holds an element on the screen of the device.
3051
- * @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
3052
- * @event Axes#hold
3053
- * @type {object}
3054
- * @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
3055
- * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3056
- * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3057
- * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3058
- *
3059
- * @example
3060
- * ```js
3061
- * const axes = new eg.Axes({
3062
- * "x": {
3063
- * range: [0, 100]
3064
- * },
3065
- * "zoom": {
3066
- * range: [50, 30]
3067
- * }
3068
- * }).on("hold", function(event) {
3069
- * // event.pos
3070
- * // event.input
3071
- * // event.inputEvent
3072
- * // isTrusted
3073
- * });
3074
- * ```
3001
+ /**
3002
+ * This event is fired when a user holds an element on the screen of the device.
3003
+ * @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
3004
+ * @event Axes#hold
3005
+ * @type {object}
3006
+ * @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
3007
+ * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3008
+ * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3009
+ * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3010
+ *
3011
+ * @example
3012
+ * ```js
3013
+ * const axes = new eg.Axes({
3014
+ * "x": {
3015
+ * range: [0, 100]
3016
+ * },
3017
+ * "zoom": {
3018
+ * range: [50, 30]
3019
+ * }
3020
+ * }).on("hold", function(event) {
3021
+ * // event.pos
3022
+ * // event.input
3023
+ * // event.inputEvent
3024
+ * // isTrusted
3025
+ * });
3026
+ * ```
3075
3027
  */
3076
-
3077
-
3078
3028
  var __proto = EventManager.prototype;
3079
-
3080
3029
  __proto.hold = function (pos, option) {
3081
3030
  var roundPos = this._getRoundPos(pos).roundPos;
3082
-
3083
3031
  this._axes.trigger(new ComponentEvent$1("hold", {
3084
3032
  pos: roundPos,
3085
3033
  input: option.input || null,
@@ -3087,151 +3035,139 @@ version: 4.10.8-beta.1
3087
3035
  isTrusted: true
3088
3036
  }));
3089
3037
  };
3090
- /**
3091
- * Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
3092
- * @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
3093
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3094
- * @example
3095
- * ```js
3096
- * const axes = new eg.Axes({
3097
- * "x": {
3098
- * range: [0, 100]
3099
- * },
3100
- * "zoom": {
3101
- * range: [50, 30]
3102
- * }
3103
- * }).on("change", function(event) {
3104
- * event.holding && event.set({x: 10});
3105
- * });
3106
- * ```
3038
+ /**
3039
+ * Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
3040
+ * @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
3041
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3042
+ * @example
3043
+ * ```js
3044
+ * const axes = new eg.Axes({
3045
+ * "x": {
3046
+ * range: [0, 100]
3047
+ * },
3048
+ * "zoom": {
3049
+ * range: [50, 30]
3050
+ * }
3051
+ * }).on("change", function(event) {
3052
+ * event.holding && event.set({x: 10});
3053
+ * });
3054
+ * ```
3107
3055
  */
3108
-
3109
- /** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
3110
- * @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
3111
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3112
- * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
3113
- * @example
3114
- * ```js
3115
- * const axes = new eg.Axes({
3116
- * "x": {
3117
- * range: [0, 100]
3118
- * },
3119
- * "zoom": {
3120
- * range: [50, 30]
3121
- * }
3122
- * }).on("animationStart", function(event) {
3123
- * event.setTo({x: 10}, 2000);
3124
- * });
3125
- * ```
3056
+ /** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
3057
+ * @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
3058
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3059
+ * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
3060
+ * @example
3061
+ * ```js
3062
+ * const axes = new eg.Axes({
3063
+ * "x": {
3064
+ * range: [0, 100]
3065
+ * },
3066
+ * "zoom": {
3067
+ * range: [50, 30]
3068
+ * }
3069
+ * }).on("animationStart", function(event) {
3070
+ * event.setTo({x: 10}, 2000);
3071
+ * });
3072
+ * ```
3126
3073
  */
3127
-
3128
- /**
3129
- * This event is fired when a user release an element on the screen of the device.
3130
- * @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
3131
- * @event Axes#release
3132
- * @type {object}
3133
- * @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
3134
- * @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
3135
- * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3136
- * @property {Object.<string, number>} bounceRatio If the coordinates at the time of release are in the bounce area, the current bounce value divided by the maximum bounce value <ko>손을 뗐을 때의 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치.</ko>
3137
- * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3138
- * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3139
- * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3140
- * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3141
- *
3142
- * @example
3143
- * ```js
3144
- * const axes = new eg.Axes({
3145
- * "x": {
3146
- * range: [0, 100]
3147
- * },
3148
- * "zoom": {
3149
- * range: [50, 30]
3150
- * }
3151
- * }).on("release", function(event) {
3152
- * // event.depaPos
3153
- * // event.destPos
3154
- * // event.delta
3155
- * // event.input
3156
- * // event.inputEvent
3157
- * // event.setTo
3158
- * // event.isTrusted
3159
- *
3160
- * // if you want to change the animation coordinates to move after the 'release' event.
3161
- * event.setTo({x: 10}, 2000);
3162
- * });
3163
- * ```
3074
+ /**
3075
+ * This event is fired when a user release an element on the screen of the device.
3076
+ * @ko 사용자가 기기의 화면에서 손을 뗐을 발생하는 이벤트
3077
+ * @event Axes#release
3078
+ * @type {object}
3079
+ * @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
3080
+ * @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뒤에 이동할 좌표</ko>
3081
+ * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3082
+ * @property {Object.<string, number>} bounceRatio If the coordinates at the time of release are in the bounce area, the current bounce value divided by the maximum bounce value <ko>손을 뗐을 때의 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치.</ko>
3083
+ * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3084
+ * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3085
+ * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3086
+ * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3087
+ *
3088
+ * @example
3089
+ * ```js
3090
+ * const axes = new eg.Axes({
3091
+ * "x": {
3092
+ * range: [0, 100]
3093
+ * },
3094
+ * "zoom": {
3095
+ * range: [50, 30]
3096
+ * }
3097
+ * }).on("release", function(event) {
3098
+ * // event.depaPos
3099
+ * // event.destPos
3100
+ * // event.delta
3101
+ * // event.input
3102
+ * // event.inputEvent
3103
+ * // event.setTo
3104
+ * // event.isTrusted
3105
+ *
3106
+ * // if you want to change the animation coordinates to move after the 'release' event.
3107
+ * event.setTo({x: 10}, 2000);
3108
+ * });
3109
+ * ```
3164
3110
  */
3165
-
3166
-
3167
3111
  __proto.triggerRelease = function (param) {
3168
3112
  var _a = this._getRoundPos(param.destPos, param.depaPos),
3169
- roundPos = _a.roundPos,
3170
- roundDepa = _a.roundDepa;
3171
-
3113
+ roundPos = _a.roundPos,
3114
+ roundDepa = _a.roundDepa;
3172
3115
  param.destPos = roundPos;
3173
3116
  param.depaPos = roundDepa;
3174
3117
  param.setTo = this._createUserControll(param.destPos, param.duration);
3175
-
3176
3118
  this._axes.trigger(new ComponentEvent$1("release", __assign$1(__assign$1({}, param), {
3177
3119
  bounceRatio: this._getBounceRatio(roundPos)
3178
3120
  })));
3179
3121
  };
3180
- /**
3181
- * This event is fired when coordinate changes.
3182
- * @ko 좌표가 변경됐을 때 발생하는 이벤트
3183
- * @event Axes#change
3184
- * @type {object}
3185
- * @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
3186
- * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3187
- * @property {Object.<string, number>} bounceRatio If the current coordinates are in the bounce area, the current bounce value divided by the maximum bounce value <ko>현재 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치.</ko>
3188
- * @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
3189
- * @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3190
- * @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3191
- * @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
3192
- * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3193
- *
3194
- * @example
3195
- * ```js
3196
- * const axes = new eg.Axes({
3197
- * "x": {
3198
- * range: [0, 100]
3199
- * },
3200
- * "zoom": {
3201
- * range: [50, 30]
3202
- * }
3203
- * }).on("change", function(event) {
3204
- * // event.pos
3205
- * // event.delta
3206
- * // event.input
3207
- * // event.inputEvent
3208
- * // event.holding
3209
- * // event.set
3210
- * // event.isTrusted
3211
- *
3212
- * // if you want to change the coordinates to move after the 'change' event.
3213
- * // it works when the holding value of the change event is true.
3214
- * event.holding && event.set({x: 10});
3215
- * });
3216
- * ```
3122
+ /**
3123
+ * This event is fired when coordinate changes.
3124
+ * @ko 좌표가 변경됐을 때 발생하는 이벤트
3125
+ * @event Axes#change
3126
+ * @type {object}
3127
+ * @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
3128
+ * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3129
+ * @property {Object.<string, number>} bounceRatio If the current coordinates are in the bounce area, the current bounce value divided by the maximum bounce value <ko>현재 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치.</ko>
3130
+ * @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
3131
+ * @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3132
+ * @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3133
+ * @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
3134
+ * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3135
+ *
3136
+ * @example
3137
+ * ```js
3138
+ * const axes = new eg.Axes({
3139
+ * "x": {
3140
+ * range: [0, 100]
3141
+ * },
3142
+ * "zoom": {
3143
+ * range: [50, 30]
3144
+ * }
3145
+ * }).on("change", function(event) {
3146
+ * // event.pos
3147
+ * // event.delta
3148
+ * // event.input
3149
+ * // event.inputEvent
3150
+ * // event.holding
3151
+ * // event.set
3152
+ * // event.isTrusted
3153
+ *
3154
+ * // if you want to change the coordinates to move after the 'change' event.
3155
+ * // it works when the holding value of the change event is true.
3156
+ * event.holding && event.set({x: 10});
3157
+ * });
3158
+ * ```
3217
3159
  */
3218
-
3219
-
3220
3160
  __proto.triggerChange = function (pos, depaPos, option, holding) {
3221
3161
  var _this = this;
3222
-
3223
3162
  if (holding === void 0) {
3224
3163
  holding = false;
3225
3164
  }
3226
-
3227
3165
  var animationManager = this.animationManager;
3228
3166
  var axisManager = animationManager.axisManager;
3229
3167
  var eventInfo = animationManager.getEventInfo();
3230
-
3231
3168
  var _a = this._getRoundPos(pos, depaPos),
3232
- roundPos = _a.roundPos,
3233
- roundDepa = _a.roundDepa;
3234
-
3169
+ roundPos = _a.roundPos,
3170
+ roundDepa = _a.roundDepa;
3235
3171
  var moveTo = axisManager.moveTo(roundPos, roundDepa);
3236
3172
  var inputEvent = (option === null || option === void 0 ? void 0 : option.event) || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.event) || null;
3237
3173
  var param = {
@@ -3243,155 +3179,136 @@ version: 4.10.8-beta.1
3243
3179
  isTrusted: !!inputEvent,
3244
3180
  input: (option === null || option === void 0 ? void 0 : option.input) || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.input) || null,
3245
3181
  set: inputEvent ? this._createUserControll(moveTo.pos) : function () {} // eslint-disable-line @typescript-eslint/no-empty-function
3246
-
3247
3182
  };
3248
- var event = new ComponentEvent$1("change", param);
3249
3183
 
3184
+ var event = new ComponentEvent$1("change", param);
3250
3185
  this._axes.trigger(event);
3251
-
3252
3186
  Object.keys(moveTo.pos).forEach(function (axis) {
3253
3187
  var p = moveTo.pos[axis];
3254
3188
  getObserver(_this._axes, axis, p).current = p;
3255
3189
  });
3256
-
3257
3190
  if (inputEvent) {
3258
3191
  axisManager.set(param.set().destPos);
3259
3192
  }
3260
-
3261
3193
  return !event.isCanceled();
3262
3194
  };
3263
- /**
3264
- * This event is fired when animation starts.
3265
- * @ko 에니메이션이 시작할 때 발생한다.
3266
- * @event Axes#animationStart
3267
- * @type {object}
3268
- * @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
3269
- * @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
3270
- * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3271
- * @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
3272
- * @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3273
- * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3274
- * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3275
- * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3276
- *
3277
- * @example
3278
- * ```js
3279
- * const axes = new eg.Axes({
3280
- * "x": {
3281
- * range: [0, 100]
3282
- * },
3283
- * "zoom": {
3284
- * range: [50, 30]
3285
- * }
3286
- * }).on("release", function(event) {
3287
- * // event.depaPos
3288
- * // event.destPos
3289
- * // event.delta
3290
- * // event.input
3291
- * // event.inputEvent
3292
- * // event.setTo
3293
- * // event.isTrusted
3294
- *
3295
- * // if you want to change the animation coordinates to move after the 'animationStart' event.
3296
- * event.setTo({x: 10}, 2000);
3297
- * });
3298
- * ```
3195
+ /**
3196
+ * This event is fired when animation starts.
3197
+ * @ko 에니메이션이 시작할 때 발생한다.
3198
+ * @event Axes#animationStart
3199
+ * @type {object}
3200
+ * @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
3201
+ * @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
3202
+ * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3203
+ * @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
3204
+ * @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3205
+ * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3206
+ * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3207
+ * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3208
+ *
3209
+ * @example
3210
+ * ```js
3211
+ * const axes = new eg.Axes({
3212
+ * "x": {
3213
+ * range: [0, 100]
3214
+ * },
3215
+ * "zoom": {
3216
+ * range: [50, 30]
3217
+ * }
3218
+ * }).on("release", function(event) {
3219
+ * // event.depaPos
3220
+ * // event.destPos
3221
+ * // event.delta
3222
+ * // event.input
3223
+ * // event.inputEvent
3224
+ * // event.setTo
3225
+ * // event.isTrusted
3226
+ *
3227
+ * // if you want to change the animation coordinates to move after the 'animationStart' event.
3228
+ * event.setTo({x: 10}, 2000);
3229
+ * });
3230
+ * ```
3299
3231
  */
3300
-
3301
-
3302
3232
  __proto.triggerAnimationStart = function (param) {
3303
3233
  var _a = this._getRoundPos(param.destPos, param.depaPos),
3304
- roundPos = _a.roundPos,
3305
- roundDepa = _a.roundDepa;
3306
-
3234
+ roundPos = _a.roundPos,
3235
+ roundDepa = _a.roundDepa;
3307
3236
  param.destPos = roundPos;
3308
3237
  param.depaPos = roundDepa;
3309
3238
  param.setTo = this._createUserControll(param.destPos, param.duration);
3310
3239
  var event = new ComponentEvent$1("animationStart", param);
3311
-
3312
3240
  this._axes.trigger(event);
3313
-
3314
3241
  return !event.isCanceled();
3315
3242
  };
3316
- /**
3317
- * This event is fired when animation ends.
3318
- * @ko 에니메이션이 끝났을 때 발생한다.
3319
- * @event Axes#animationEnd
3320
- * @type {object}
3321
- * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3322
- *
3323
- * @example
3324
- * ```js
3325
- * const axes = new eg.Axes({
3326
- * "x": {
3327
- * range: [0, 100]
3328
- * },
3329
- * "zoom": {
3330
- * range: [50, 30]
3331
- * }
3332
- * }).on("animationEnd", function(event) {
3333
- * // event.isTrusted
3334
- * });
3335
- * ```
3243
+ /**
3244
+ * This event is fired when animation ends.
3245
+ * @ko 에니메이션이 끝났을 때 발생한다.
3246
+ * @event Axes#animationEnd
3247
+ * @type {object}
3248
+ * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3249
+ *
3250
+ * @example
3251
+ * ```js
3252
+ * const axes = new eg.Axes({
3253
+ * "x": {
3254
+ * range: [0, 100]
3255
+ * },
3256
+ * "zoom": {
3257
+ * range: [50, 30]
3258
+ * }
3259
+ * }).on("animationEnd", function(event) {
3260
+ * // event.isTrusted
3261
+ * });
3262
+ * ```
3336
3263
  */
3337
-
3338
-
3339
3264
  __proto.triggerAnimationEnd = function (isTrusted) {
3340
3265
  if (isTrusted === void 0) {
3341
3266
  isTrusted = false;
3342
3267
  }
3343
-
3344
3268
  this._axes.trigger(new ComponentEvent$1("animationEnd", {
3345
3269
  isTrusted: isTrusted
3346
3270
  }));
3347
3271
  };
3348
- /**
3349
- * This event is fired when all actions have been completed.
3350
- * @ko 에니메이션이 끝났을 때 발생한다.
3351
- * @event Axes#finish
3352
- * @type {object}
3353
- * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3354
- *
3355
- * @example
3356
- * ```js
3357
- * const axes = new eg.Axes({
3358
- * "x": {
3359
- * range: [0, 100]
3360
- * },
3361
- * "zoom": {
3362
- * range: [50, 30]
3363
- * }
3364
- * }).on("finish", function(event) {
3365
- * // event.isTrusted
3366
- * });
3367
- * ```
3272
+ /**
3273
+ * This event is fired when all actions have been completed.
3274
+ * @ko 에니메이션이 끝났을 때 발생한다.
3275
+ * @event Axes#finish
3276
+ * @type {object}
3277
+ * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
3278
+ *
3279
+ * @example
3280
+ * ```js
3281
+ * const axes = new eg.Axes({
3282
+ * "x": {
3283
+ * range: [0, 100]
3284
+ * },
3285
+ * "zoom": {
3286
+ * range: [50, 30]
3287
+ * }
3288
+ * }).on("finish", function(event) {
3289
+ * // event.isTrusted
3290
+ * });
3291
+ * ```
3368
3292
  */
3369
-
3370
-
3371
3293
  __proto.triggerFinish = function (isTrusted) {
3372
3294
  if (isTrusted === void 0) {
3373
3295
  isTrusted = false;
3374
3296
  }
3375
-
3376
3297
  this._axes.trigger(new ComponentEvent$1("finish", {
3377
3298
  isTrusted: isTrusted
3378
3299
  }));
3379
3300
  };
3380
-
3381
3301
  __proto.setAnimationManager = function (animationManager) {
3382
3302
  this.animationManager = animationManager;
3383
3303
  };
3384
-
3385
3304
  __proto.destroy = function () {
3386
3305
  this._axes.off();
3387
3306
  };
3388
-
3389
3307
  __proto._createUserControll = function (pos, duration) {
3390
3308
  if (duration === void 0) {
3391
3309
  duration = 0;
3392
- } // to controll
3393
-
3394
-
3310
+ }
3311
+ // to controll
3395
3312
  var userControl = {
3396
3313
  destPos: __assign$1({}, pos),
3397
3314
  duration: duration
@@ -3400,27 +3317,23 @@ version: 4.10.8-beta.1
3400
3317
  if (toPos) {
3401
3318
  userControl.destPos = __assign$1({}, toPos);
3402
3319
  }
3403
-
3404
3320
  if (userDuration !== undefined) {
3405
3321
  userControl.duration = userDuration;
3406
3322
  }
3407
-
3408
3323
  return userControl;
3409
3324
  };
3410
3325
  };
3411
-
3412
3326
  __proto._getRoundPos = function (pos, depaPos) {
3413
3327
  // round value if round exist
3414
- var roundUnit = this._axes.options.round; // if (round == null) {
3328
+ var roundUnit = this._axes.options.round;
3329
+ // if (round == null) {
3415
3330
  // return {pos, depaPos}; // undefined, undefined
3416
3331
  // }
3417
-
3418
3332
  return {
3419
3333
  roundPos: roundNumbers(pos, roundUnit),
3420
3334
  roundDepa: roundNumbers(depaPos, roundUnit)
3421
3335
  };
3422
3336
  };
3423
-
3424
3337
  __proto._getBounceRatio = function (pos) {
3425
3338
  return this._axes.axisManager.map(pos, function (v, opt) {
3426
3339
  if (v < opt.range[0] && opt.bounce[0] !== 0) {
@@ -3432,43 +3345,34 @@ version: 4.10.8-beta.1
3432
3345
  }
3433
3346
  });
3434
3347
  };
3435
-
3436
3348
  __decorate([Observe], EventManager.prototype, "holdingCount", void 0);
3437
-
3438
3349
  return EventManager;
3439
3350
  }();
3440
3351
 
3441
- var InterruptManager =
3442
- /*#__PURE__*/
3443
- function () {
3352
+ var InterruptManager = /*#__PURE__*/function () {
3444
3353
  function InterruptManager(_options) {
3445
3354
  this._options = _options;
3446
3355
  this._prevented = false; // check whether the animation event was prevented
3447
3356
  }
3448
-
3449
3357
  var __proto = InterruptManager.prototype;
3450
-
3451
3358
  __proto.isInterrupting = function () {
3452
3359
  // when interruptable is 'true', return value is always 'true'.
3453
3360
  return this._options.interruptable || this._prevented;
3454
3361
  };
3455
-
3456
3362
  __proto.isInterrupted = function () {
3457
3363
  return !this._options.interruptable && this._prevented;
3458
3364
  };
3459
-
3460
3365
  __proto.setInterrupt = function (prevented) {
3461
3366
  if (!this._options.interruptable) {
3462
3367
  this._prevented = prevented;
3463
3368
  }
3464
3369
  };
3465
-
3466
3370
  return InterruptManager;
3467
3371
  }();
3468
3372
 
3469
- /*
3470
- * Copyright (c) 2015 NAVER Corp.
3471
- * egjs projects are licensed under the MIT license
3373
+ /*
3374
+ * Copyright (c) 2015 NAVER Corp.
3375
+ * egjs projects are licensed under the MIT license
3472
3376
  */
3473
3377
  var getInsidePosition = function (destPos, range, circular, bounce) {
3474
3378
  var toDestPos = destPos;
@@ -3476,18 +3380,18 @@ version: 4.10.8-beta.1
3476
3380
  toDestPos = Math.max(targetRange[0], toDestPos);
3477
3381
  toDestPos = Math.min(targetRange[1], toDestPos);
3478
3382
  return toDestPos;
3479
- }; // determine outside
3480
-
3383
+ };
3384
+ // determine outside
3481
3385
  var isOutside = function (pos, range) {
3482
3386
  return pos < range[0] || pos > range[1];
3483
- }; // determine whether position has reached the maximum moveable area
3484
-
3387
+ };
3388
+ // determine whether position has reached the maximum moveable area
3485
3389
  var isEndofBounce = function (pos, range, bounce, circular) {
3486
3390
  return !circular[0] && pos === range[0] - bounce[0] || !circular[1] && pos === range[1] + bounce[1];
3487
3391
  };
3488
3392
  var getDuration = function (distance, deceleration) {
3489
- var duration = Math.sqrt(distance / deceleration * 2); // when duration is under 100, then value is zero
3490
-
3393
+ var duration = Math.sqrt(distance / deceleration * 2);
3394
+ // when duration is under 100, then value is zero
3491
3395
  return duration < 100 ? 0 : duration;
3492
3396
  };
3493
3397
  var isCircularable = function (destPos, range, circular) {
@@ -3498,66 +3402,51 @@ version: 4.10.8-beta.1
3498
3402
  var min = range[0];
3499
3403
  var max = range[1];
3500
3404
  var length = max - min;
3501
-
3502
3405
  if (circular[1] && pos > max) {
3503
3406
  // right
3504
3407
  toPos = (toPos - max) % length + min;
3505
3408
  }
3506
-
3507
3409
  if (circular[0] && pos < min) {
3508
3410
  // left
3509
3411
  toPos = (toPos - min) % length + max;
3510
3412
  }
3511
-
3512
3413
  return toPos;
3513
3414
  };
3514
3415
 
3515
- var AxisManager =
3516
- /*#__PURE__*/
3517
- function () {
3416
+ var AxisManager = /*#__PURE__*/function () {
3518
3417
  function AxisManager(_axis) {
3519
3418
  var _this = this;
3520
-
3521
3419
  this._axis = _axis;
3522
-
3523
3420
  this._complementOptions();
3524
-
3525
3421
  this._pos = Object.keys(this._axis).reduce(function (pos, v) {
3526
3422
  pos[v] = _this._axis[v].startPos;
3527
3423
  return pos;
3528
3424
  }, {});
3529
3425
  }
3530
-
3531
3426
  var __proto = AxisManager.prototype;
3532
-
3533
3427
  __proto.getDelta = function (depaPos, destPos) {
3534
3428
  var fullDepaPos = this.get(depaPos);
3535
3429
  return map(this.get(destPos), function (v, k) {
3536
3430
  return v - fullDepaPos[k];
3537
3431
  });
3538
3432
  };
3539
-
3540
3433
  __proto.get = function (axes) {
3541
3434
  var _this = this;
3542
-
3543
3435
  if (axes && Array.isArray(axes)) {
3544
3436
  return axes.reduce(function (acc, v) {
3545
3437
  if (v && v in _this._pos) {
3546
3438
  acc[v] = _this._pos[v];
3547
3439
  }
3548
-
3549
3440
  return acc;
3550
3441
  }, {});
3551
3442
  } else {
3552
3443
  return __assign$1(__assign$1({}, this._pos), axes || {});
3553
3444
  }
3554
3445
  };
3555
-
3556
3446
  __proto.moveTo = function (pos, depaPos) {
3557
3447
  if (depaPos === void 0) {
3558
3448
  depaPos = this._pos;
3559
3449
  }
3560
-
3561
3450
  var delta = map(this._pos, function (v, key) {
3562
3451
  return key in pos && key in depaPos ? pos[key] - depaPos[key] : 0;
3563
3452
  });
@@ -3569,7 +3458,6 @@ version: 4.10.8-beta.1
3569
3458
  delta: delta
3570
3459
  };
3571
3460
  };
3572
-
3573
3461
  __proto.set = function (pos) {
3574
3462
  for (var k in pos) {
3575
3463
  if (k && k in this._pos) {
@@ -3577,60 +3465,48 @@ version: 4.10.8-beta.1
3577
3465
  }
3578
3466
  }
3579
3467
  };
3580
-
3581
3468
  __proto.every = function (pos, callback) {
3582
3469
  var axisOptions = this._axis;
3583
3470
  return every(pos, function (value, key) {
3584
3471
  return callback(value, axisOptions[key], key);
3585
3472
  });
3586
3473
  };
3587
-
3588
3474
  __proto.filter = function (pos, callback) {
3589
3475
  var axisOptions = this._axis;
3590
3476
  return filter(pos, function (value, key) {
3591
3477
  return callback(value, axisOptions[key], key);
3592
3478
  });
3593
3479
  };
3594
-
3595
3480
  __proto.map = function (pos, callback) {
3596
3481
  var axisOptions = this._axis;
3597
3482
  return map(pos, function (value, key) {
3598
3483
  return callback(value, axisOptions[key], key);
3599
3484
  });
3600
3485
  };
3601
-
3602
3486
  __proto.isOutside = function (axes) {
3603
3487
  return !this.every(axes ? this.get(axes) : this._pos, function (v, opt) {
3604
3488
  return !isOutside(v, opt.range);
3605
3489
  });
3606
3490
  };
3607
-
3608
3491
  __proto.getAxisOptions = function (key) {
3609
3492
  return this._axis[key];
3610
3493
  };
3611
-
3612
3494
  __proto.setAxis = function (axis) {
3613
3495
  var _this = this;
3614
-
3615
3496
  Object.keys(axis).forEach(function (key) {
3616
3497
  if (!_this._axis[key]) {
3617
3498
  throw new Error("Axis ".concat(key, " does not exist in Axes instance"));
3618
3499
  }
3619
-
3620
3500
  _this._axis[key] = __assign$1(__assign$1({}, _this._axis[key]), axis[key]);
3621
3501
  });
3622
-
3623
3502
  this._complementOptions();
3624
3503
  };
3625
- /**
3626
- * set up 'css' expression
3627
- * @private
3504
+ /**
3505
+ * set up 'css' expression
3506
+ * @private
3628
3507
  */
3629
-
3630
-
3631
3508
  __proto._complementOptions = function () {
3632
3509
  var _this = this;
3633
-
3634
3510
  Object.keys(this._axis).forEach(function (axis) {
3635
3511
  _this._axis[axis] = __assign$1({
3636
3512
  range: [0, 100],
@@ -3641,14 +3517,12 @@ version: 4.10.8-beta.1
3641
3517
  ["bounce", "circular"].forEach(function (v) {
3642
3518
  var axisOption = _this._axis;
3643
3519
  var key = axisOption[axis][v];
3644
-
3645
3520
  if (/string|number|boolean/.test(typeof key)) {
3646
3521
  axisOption[axis][v] = [key, key];
3647
3522
  }
3648
3523
  });
3649
3524
  });
3650
3525
  };
3651
-
3652
3526
  return AxisManager;
3653
3527
  }();
3654
3528
 
@@ -3660,31 +3534,21 @@ version: 4.10.8-beta.1
3660
3534
  if (!inputKey || inputKey.indexOf(ANY) > -1 || inputKey.indexOf(NONE) > -1 && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey || inputKey.indexOf(SHIFT) > -1 && event.shiftKey || inputKey.indexOf(CTRL) > -1 && event.ctrlKey || inputKey.indexOf(ALT) > -1 && event.altKey || inputKey.indexOf(META) > -1 && event.metaKey) {
3661
3535
  return true;
3662
3536
  }
3663
-
3664
3537
  return false;
3665
3538
  };
3666
-
3667
- var EventInput =
3668
- /*#__PURE__*/
3669
- function () {
3539
+ var EventInput = /*#__PURE__*/function () {
3670
3540
  function EventInput() {
3671
3541
  var _this = this;
3672
-
3673
3542
  this._stopContextMenu = function (event) {
3674
3543
  event.preventDefault();
3675
3544
  win.removeEventListener("contextmenu", _this._stopContextMenu);
3676
3545
  };
3677
3546
  }
3678
-
3679
3547
  var __proto = EventInput.prototype;
3680
-
3681
3548
  __proto.extendEvent = function (event) {
3682
3549
  var _a;
3683
-
3684
3550
  var prevEvent = this.prevEvent;
3685
-
3686
3551
  var center = this._getCenter(event);
3687
-
3688
3552
  var movement = prevEvent ? this._getMovement(event) : {
3689
3553
  x: 0,
3690
3554
  y: 0
@@ -3700,19 +3564,16 @@ version: 4.10.8-beta.1
3700
3564
  var deltaTime = latestInterval ? timeStamp - latestInterval.timestamp : 0;
3701
3565
  var velocityX = prevEvent ? prevEvent.velocityX : 0;
3702
3566
  var velocityY = prevEvent ? prevEvent.velocityY : 0;
3703
-
3704
3567
  if (!latestInterval || deltaTime >= VELOCITY_INTERVAL) {
3705
3568
  if (latestInterval) {
3706
3569
  _a = [(deltaX - latestInterval.deltaX) / deltaTime, (deltaY - latestInterval.deltaY) / deltaTime], velocityX = _a[0], velocityY = _a[1];
3707
3570
  }
3708
-
3709
3571
  this._latestInterval = {
3710
3572
  timestamp: timeStamp,
3711
3573
  deltaX: deltaX,
3712
3574
  deltaY: deltaY
3713
3575
  };
3714
3576
  }
3715
-
3716
3577
  return {
3717
3578
  srcEvent: event,
3718
3579
  scale: scale,
@@ -3727,13 +3588,11 @@ version: 4.10.8-beta.1
3727
3588
  preventSystemEvent: true
3728
3589
  };
3729
3590
  };
3730
-
3731
3591
  __proto._getDistance = function (start, end) {
3732
3592
  var x = end.clientX - start.clientX;
3733
3593
  var y = end.clientY - start.clientY;
3734
3594
  return Math.sqrt(x * x + y * y);
3735
3595
  };
3736
-
3737
3596
  __proto._getButton = function (event) {
3738
3597
  var buttonCodeMap = {
3739
3598
  1: MOUSE_LEFT,
@@ -3743,19 +3602,15 @@ version: 4.10.8-beta.1
3743
3602
  var button = this._isTouchEvent(event) ? MOUSE_LEFT : buttonCodeMap[event.buttons];
3744
3603
  return button ? button : null;
3745
3604
  };
3746
-
3747
3605
  __proto._isTouchEvent = function (event) {
3748
3606
  return event.type && event.type.indexOf("touch") > -1;
3749
3607
  };
3750
-
3751
3608
  __proto._isValidButton = function (button, inputButton) {
3752
3609
  return inputButton.indexOf(button) > -1;
3753
3610
  };
3754
-
3755
3611
  __proto._isValidEvent = function (event, inputKey, inputButton) {
3756
3612
  return (!inputKey || isValidKey(event, inputKey)) && (!inputButton || this._isValidButton(this._getButton(event), inputButton));
3757
3613
  };
3758
-
3759
3614
  __proto._preventMouseButton = function (event, button) {
3760
3615
  if (button === MOUSE_RIGHT) {
3761
3616
  win.addEventListener("contextmenu", this._stopContextMenu);
@@ -3763,74 +3618,55 @@ version: 4.10.8-beta.1
3763
3618
  event.preventDefault();
3764
3619
  }
3765
3620
  };
3766
-
3767
3621
  return EventInput;
3768
3622
  }();
3769
3623
 
3770
- var MouseEventInput =
3771
- /*#__PURE__*/
3772
- function (_super) {
3624
+ var MouseEventInput = /*#__PURE__*/function (_super) {
3773
3625
  __extends$1(MouseEventInput, _super);
3774
-
3775
3626
  function MouseEventInput() {
3776
3627
  var _this = _super !== null && _super.apply(this, arguments) || this;
3777
-
3778
3628
  _this.start = ["mousedown"];
3779
3629
  _this.move = ["mousemove"];
3780
3630
  _this.end = ["mouseup"];
3781
3631
  return _this;
3782
3632
  }
3783
-
3784
3633
  var __proto = MouseEventInput.prototype;
3785
-
3786
3634
  __proto.onEventStart = function (event, inputKey, inputButton) {
3787
3635
  var button = this._getButton(event);
3788
-
3789
3636
  if (!this._isValidEvent(event, inputKey, inputButton)) {
3790
3637
  return null;
3791
3638
  }
3792
-
3793
3639
  this._preventMouseButton(event, button);
3794
-
3795
3640
  return this.extendEvent(event);
3796
3641
  };
3797
-
3798
3642
  __proto.onEventMove = function (event, inputKey, inputButton) {
3799
3643
  if (!this._isValidEvent(event, inputKey, inputButton)) {
3800
3644
  return null;
3801
3645
  }
3802
-
3803
3646
  return this.extendEvent(event);
3804
3647
  };
3805
-
3806
3648
  __proto.onEventEnd = function () {
3807
3649
  return;
3808
3650
  };
3809
-
3810
3651
  __proto.onRelease = function () {
3811
3652
  this.prevEvent = null;
3812
3653
  return;
3813
3654
  };
3814
-
3815
3655
  __proto.getTouches = function (event, inputButton) {
3816
3656
  if (inputButton) {
3817
3657
  return this._isValidButton(MOUSE_BUTTON_CODE_MAP[event.which], inputButton) && this.end.indexOf(event.type) === -1 ? 1 : 0;
3818
3658
  }
3819
-
3820
3659
  return 0;
3821
3660
  };
3822
-
3823
3661
  __proto._getScale = function () {
3824
3662
  return 1;
3825
3663
  };
3826
-
3827
3664
  __proto._getCenter = function (event) {
3828
3665
  return {
3829
3666
  x: event.clientX,
3830
3667
  y: event.clientY
3831
3668
  };
3832
3669
  };
3833
-
3834
3670
  __proto._getMovement = function (event) {
3835
3671
  var prev = this.prevEvent.srcEvent;
3836
3672
  return {
@@ -3838,59 +3674,44 @@ version: 4.10.8-beta.1
3838
3674
  y: event.clientY - prev.clientY
3839
3675
  };
3840
3676
  };
3841
-
3842
3677
  return MouseEventInput;
3843
3678
  }(EventInput);
3844
3679
 
3845
- var TouchEventInput =
3846
- /*#__PURE__*/
3847
- function (_super) {
3680
+ var TouchEventInput = /*#__PURE__*/function (_super) {
3848
3681
  __extends$1(TouchEventInput, _super);
3849
-
3850
3682
  function TouchEventInput() {
3851
3683
  var _this = _super !== null && _super.apply(this, arguments) || this;
3852
-
3853
3684
  _this.start = ["touchstart"];
3854
3685
  _this.move = ["touchmove"];
3855
3686
  _this.end = ["touchend", "touchcancel"];
3856
3687
  return _this;
3857
3688
  }
3858
-
3859
3689
  var __proto = TouchEventInput.prototype;
3860
-
3861
3690
  __proto.onEventStart = function (event, inputKey) {
3862
3691
  this._baseTouches = event.touches;
3863
-
3864
3692
  if (!this._isValidEvent(event, inputKey)) {
3865
3693
  return null;
3866
3694
  }
3867
-
3868
3695
  return this.extendEvent(event);
3869
3696
  };
3870
-
3871
3697
  __proto.onEventMove = function (event, inputKey) {
3872
3698
  if (!this._isValidEvent(event, inputKey)) {
3873
3699
  return null;
3874
3700
  }
3875
-
3876
3701
  return this.extendEvent(event);
3877
3702
  };
3878
-
3879
3703
  __proto.onEventEnd = function (event) {
3880
3704
  this._baseTouches = event.touches;
3881
3705
  return;
3882
3706
  };
3883
-
3884
3707
  __proto.onRelease = function () {
3885
3708
  this.prevEvent = null;
3886
3709
  this._baseTouches = null;
3887
3710
  return;
3888
3711
  };
3889
-
3890
3712
  __proto.getTouches = function (event) {
3891
3713
  return event.touches.length;
3892
3714
  };
3893
-
3894
3715
  __proto._getScale = function (event) {
3895
3716
  if (event.touches.length !== 2 || this._baseTouches.length < 2) {
3896
3717
  return null; // TODO: consider calculating non-pinch gesture scale
@@ -3898,91 +3719,69 @@ version: 4.10.8-beta.1
3898
3719
 
3899
3720
  return this._getDistance(event.touches[0], event.touches[1]) / this._getDistance(this._baseTouches[0], this._baseTouches[1]);
3900
3721
  };
3901
-
3902
3722
  __proto._getCenter = function (event) {
3903
3723
  return {
3904
3724
  x: event.touches[0].clientX,
3905
3725
  y: event.touches[0].clientY
3906
3726
  };
3907
3727
  };
3908
-
3909
3728
  __proto._getMovement = function (event) {
3910
3729
  var prev = this.prevEvent.srcEvent;
3911
-
3912
3730
  if (event.touches[0].identifier !== prev.touches[0].identifier) {
3913
3731
  return {
3914
3732
  x: 0,
3915
3733
  y: 0
3916
3734
  };
3917
3735
  }
3918
-
3919
3736
  return {
3920
3737
  x: event.touches[0].clientX - prev.touches[0].clientX,
3921
3738
  y: event.touches[0].clientY - prev.touches[0].clientY
3922
3739
  };
3923
3740
  };
3924
-
3925
3741
  return TouchEventInput;
3926
3742
  }(EventInput);
3927
3743
 
3928
- var PointerEventInput =
3929
- /*#__PURE__*/
3930
- function (_super) {
3744
+ var PointerEventInput = /*#__PURE__*/function (_super) {
3931
3745
  __extends$1(PointerEventInput, _super);
3932
-
3933
3746
  function PointerEventInput() {
3934
3747
  var _this = _super !== null && _super.apply(this, arguments) || this;
3935
-
3936
3748
  _this.start = SUPPORT_POINTER ? ["pointerdown"] : ["MSPointerDown"];
3937
3749
  _this.move = SUPPORT_POINTER ? ["pointermove"] : ["MSPointerMove"];
3938
- _this.end = SUPPORT_POINTER ? ["pointerup", "pointercancel"] : ["MSPointerUp", "MSPointerCancel"]; // store first, recent inputs for each event id
3939
-
3750
+ _this.end = SUPPORT_POINTER ? ["pointerup", "pointercancel"] : ["MSPointerUp", "MSPointerCancel"];
3751
+ // store first, recent inputs for each event id
3940
3752
  _this._firstInputs = [];
3941
3753
  _this._recentInputs = [];
3942
3754
  return _this;
3943
3755
  }
3944
-
3945
3756
  var __proto = PointerEventInput.prototype;
3946
-
3947
3757
  __proto.onEventStart = function (event, inputKey, inputButton) {
3948
3758
  var button = this._getButton(event);
3949
-
3950
3759
  if (!this._isValidEvent(event, inputKey, inputButton)) {
3951
3760
  return null;
3952
3761
  }
3953
-
3954
3762
  this._preventMouseButton(event, button);
3955
-
3956
3763
  this._updatePointerEvent(event);
3957
-
3958
3764
  return this.extendEvent(event);
3959
3765
  };
3960
-
3961
3766
  __proto.onEventMove = function (event, inputKey, inputButton) {
3962
3767
  if (!this._isValidEvent(event, inputKey, inputButton)) {
3963
3768
  return null;
3964
3769
  }
3965
-
3966
3770
  this._updatePointerEvent(event);
3967
-
3968
3771
  return this.extendEvent(event);
3969
3772
  };
3970
-
3971
3773
  __proto.onEventEnd = function (event) {
3972
3774
  this._removePointerEvent(event);
3973
3775
  };
3974
-
3975
3776
  __proto.onRelease = function () {
3976
3777
  this.prevEvent = null;
3977
3778
  this._firstInputs = [];
3978
3779
  this._recentInputs = [];
3979
3780
  return;
3980
3781
  };
3981
-
3982
3782
  __proto.getTouches = function () {
3983
3783
  return this._recentInputs.length;
3984
3784
  };
3985
-
3986
3785
  __proto._getScale = function () {
3987
3786
  if (this._recentInputs.length !== 2) {
3988
3787
  return null; // TODO: consider calculating non-pinch gesture scale
@@ -3990,49 +3789,39 @@ version: 4.10.8-beta.1
3990
3789
 
3991
3790
  return this._getDistance(this._recentInputs[0], this._recentInputs[1]) / this._getDistance(this._firstInputs[0], this._firstInputs[1]);
3992
3791
  };
3993
-
3994
3792
  __proto._getCenter = function (event) {
3995
3793
  return {
3996
3794
  x: event.clientX,
3997
3795
  y: event.clientY
3998
3796
  };
3999
3797
  };
4000
-
4001
3798
  __proto._getMovement = function (event) {
4002
3799
  var prev = this.prevEvent.srcEvent;
4003
-
4004
3800
  if (event.pointerId !== prev.pointerId) {
4005
3801
  return {
4006
3802
  x: 0,
4007
3803
  y: 0
4008
3804
  };
4009
3805
  }
4010
-
4011
3806
  return {
4012
3807
  x: event.clientX - prev.clientX,
4013
3808
  y: event.clientY - prev.clientY
4014
3809
  };
4015
3810
  };
4016
-
4017
3811
  __proto._updatePointerEvent = function (event) {
4018
3812
  var _this = this;
4019
-
4020
3813
  var addFlag = false;
4021
-
4022
3814
  this._recentInputs.forEach(function (e, i) {
4023
3815
  if (e.pointerId === event.pointerId) {
4024
3816
  addFlag = true;
4025
3817
  _this._recentInputs[i] = event;
4026
3818
  }
4027
3819
  });
4028
-
4029
3820
  if (!addFlag) {
4030
3821
  this._firstInputs.push(event);
4031
-
4032
3822
  this._recentInputs.push(event);
4033
3823
  }
4034
3824
  };
4035
-
4036
3825
  __proto._removePointerEvent = function (event) {
4037
3826
  this._firstInputs = this._firstInputs.filter(function (x) {
4038
3827
  return x.pointerId !== event.pointerId;
@@ -4041,64 +3830,47 @@ version: 4.10.8-beta.1
4041
3830
  return x.pointerId !== event.pointerId;
4042
3831
  });
4043
3832
  };
4044
-
4045
3833
  return PointerEventInput;
4046
3834
  }(EventInput);
4047
3835
 
4048
- var TouchMouseEventInput =
4049
- /*#__PURE__*/
4050
- function (_super) {
3836
+ var TouchMouseEventInput = /*#__PURE__*/function (_super) {
4051
3837
  __extends$1(TouchMouseEventInput, _super);
4052
-
4053
3838
  function TouchMouseEventInput() {
4054
3839
  var _this = _super !== null && _super.apply(this, arguments) || this;
4055
-
4056
3840
  _this.start = ["mousedown", "touchstart"];
4057
3841
  _this.move = ["mousemove", "touchmove"];
4058
3842
  _this.end = ["mouseup", "touchend", "touchcancel"];
4059
3843
  return _this;
4060
3844
  }
4061
-
4062
3845
  var __proto = TouchMouseEventInput.prototype;
4063
-
4064
3846
  __proto.onEventStart = function (event, inputKey, inputButton) {
4065
3847
  var button = this._getButton(event);
4066
-
4067
3848
  if (this._isTouchEvent(event)) {
4068
3849
  this._baseTouches = event.touches;
4069
3850
  }
4070
-
4071
3851
  if (!this._isValidEvent(event, inputKey, inputButton)) {
4072
3852
  return null;
4073
3853
  }
4074
-
4075
3854
  this._preventMouseButton(event, button);
4076
-
4077
3855
  return this.extendEvent(event);
4078
3856
  };
4079
-
4080
3857
  __proto.onEventMove = function (event, inputKey, inputButton) {
4081
3858
  if (!this._isValidEvent(event, inputKey, inputButton)) {
4082
3859
  return null;
4083
3860
  }
4084
-
4085
3861
  return this.extendEvent(event);
4086
3862
  };
4087
-
4088
3863
  __proto.onEventEnd = function (event) {
4089
3864
  if (this._isTouchEvent(event)) {
4090
3865
  this._baseTouches = event.touches;
4091
3866
  }
4092
-
4093
3867
  return;
4094
3868
  };
4095
-
4096
3869
  __proto.onRelease = function () {
4097
3870
  this.prevEvent = null;
4098
3871
  this._baseTouches = null;
4099
3872
  return;
4100
3873
  };
4101
-
4102
3874
  __proto.getTouches = function (event, inputButton) {
4103
3875
  if (this._isTouchEvent(event)) {
4104
3876
  return event.touches.length;
@@ -4106,7 +3878,6 @@ version: 4.10.8-beta.1
4106
3878
  return this._isValidButton(MOUSE_BUTTON_CODE_MAP[event.which], inputButton) && this.end.indexOf(event.type) === -1 ? 1 : 0;
4107
3879
  }
4108
3880
  };
4109
-
4110
3881
  __proto._getScale = function (event) {
4111
3882
  if (this._isTouchEvent(event)) {
4112
3883
  if (event.touches.length !== 2 || this._baseTouches.length < 2) {
@@ -4115,10 +3886,8 @@ version: 4.10.8-beta.1
4115
3886
 
4116
3887
  return this._getDistance(event.touches[0], event.touches[1]) / this._getDistance(this._baseTouches[0], this._baseTouches[1]);
4117
3888
  }
4118
-
4119
3889
  return this.prevEvent.scale;
4120
3890
  };
4121
-
4122
3891
  __proto._getCenter = function (event) {
4123
3892
  if (this._isTouchEvent(event)) {
4124
3893
  return {
@@ -4126,36 +3895,30 @@ version: 4.10.8-beta.1
4126
3895
  y: event.touches[0].clientY
4127
3896
  };
4128
3897
  }
4129
-
4130
3898
  return {
4131
3899
  x: event.clientX,
4132
3900
  y: event.clientY
4133
3901
  };
4134
3902
  };
4135
-
4136
3903
  __proto._getMovement = function (event) {
4137
3904
  var _this = this;
4138
-
4139
3905
  var prev = this.prevEvent.srcEvent;
4140
-
4141
3906
  var _a = [event, prev].map(function (e) {
4142
- if (_this._isTouchEvent(e)) {
3907
+ if (_this._isTouchEvent(e)) {
3908
+ return {
3909
+ id: e.touches[0].identifier,
3910
+ x: e.touches[0].clientX,
3911
+ y: e.touches[0].clientY
3912
+ };
3913
+ }
4143
3914
  return {
4144
- id: e.touches[0].identifier,
4145
- x: e.touches[0].clientX,
4146
- y: e.touches[0].clientY
3915
+ id: null,
3916
+ x: e.clientX,
3917
+ y: e.clientY
4147
3918
  };
4148
- }
4149
-
4150
- return {
4151
- id: null,
4152
- x: e.clientX,
4153
- y: e.clientY
4154
- };
4155
- }),
4156
- nextSpot = _a[0],
4157
- prevSpot = _a[1];
4158
-
3919
+ }),
3920
+ nextSpot = _a[0],
3921
+ prevSpot = _a[1];
4159
3922
  return nextSpot.id === prevSpot.id ? {
4160
3923
  x: nextSpot.x - prevSpot.x,
4161
3924
  y: nextSpot.y - prevSpot.y
@@ -4164,7 +3927,6 @@ version: 4.10.8-beta.1
4164
3927
  y: 0
4165
3928
  };
4166
3929
  };
4167
-
4168
3930
  return TouchMouseEventInput;
4169
3931
  }(EventInput);
4170
3932
 
@@ -4173,7 +3935,6 @@ version: 4.10.8-beta.1
4173
3935
  if (source[i]) {
4174
3936
  acc[source[i]] = v;
4175
3937
  }
4176
-
4177
3938
  return acc;
4178
3939
  }, {});
4179
3940
  };
@@ -4181,7 +3942,6 @@ version: 4.10.8-beta.1
4181
3942
  if (inputType === void 0) {
4182
3943
  inputType = [];
4183
3944
  }
4184
-
4185
3945
  var hasTouch = false;
4186
3946
  var hasMouse = false;
4187
3947
  var hasPointer = false;
@@ -4190,11 +3950,9 @@ version: 4.10.8-beta.1
4190
3950
  case "mouse":
4191
3951
  hasMouse = true;
4192
3952
  break;
4193
-
4194
3953
  case "touch":
4195
3954
  hasTouch = SUPPORT_TOUCH;
4196
3955
  break;
4197
-
4198
3956
  case "pointer":
4199
3957
  hasPointer = SUPPORT_POINTER_EVENTS;
4200
3958
  // no default
@@ -4210,7 +3968,6 @@ version: 4.10.8-beta.1
4210
3968
  } else if (hasMouse) {
4211
3969
  return new MouseEventInput();
4212
3970
  }
4213
-
4214
3971
  return null;
4215
3972
  };
4216
3973
  function getAddEventOptions(eventName) {
@@ -4221,15 +3978,13 @@ version: 4.10.8-beta.1
4221
3978
  } : false;
4222
3979
  }
4223
3980
 
4224
- var InputObserver =
4225
- /*#__PURE__*/
4226
- function () {
3981
+ var InputObserver = /*#__PURE__*/function () {
4227
3982
  function InputObserver(_a) {
4228
3983
  var options = _a.options,
4229
- interruptManager = _a.interruptManager,
4230
- eventManager = _a.eventManager,
4231
- axisManager = _a.axisManager,
4232
- animationManager = _a.animationManager;
3984
+ interruptManager = _a.interruptManager,
3985
+ eventManager = _a.eventManager,
3986
+ axisManager = _a.axisManager,
3987
+ animationManager = _a.animationManager;
4233
3988
  this._isOutside = false;
4234
3989
  this._moveDistance = null;
4235
3990
  this._isStopped = false;
@@ -4239,123 +3994,92 @@ version: 4.10.8-beta.1
4239
3994
  this._axisManager = axisManager;
4240
3995
  this._animationManager = animationManager;
4241
3996
  }
4242
-
4243
3997
  var __proto = InputObserver.prototype;
4244
-
4245
3998
  __proto.get = function (input) {
4246
3999
  return this._axisManager.get(input.axes);
4247
4000
  };
4248
-
4249
4001
  __proto.hold = function (input, event) {
4250
4002
  if (this._interruptManager.isInterrupted() || !input.axes.length) {
4251
4003
  return;
4252
4004
  }
4253
-
4254
4005
  var changeOption = {
4255
4006
  input: input,
4256
4007
  event: event
4257
4008
  };
4258
4009
  this._isStopped = false;
4259
-
4260
4010
  this._interruptManager.setInterrupt(true);
4261
-
4262
4011
  this._animationManager.stopAnimation(changeOption);
4263
-
4264
4012
  ++this._eventManager.holdingCount;
4265
-
4266
4013
  if (!this._moveDistance) {
4267
4014
  this._eventManager.hold(this._axisManager.get(), changeOption);
4268
4015
  }
4269
-
4270
4016
  this._isOutside = this._axisManager.isOutside(input.axes);
4271
4017
  this._moveDistance = this._axisManager.get(input.axes);
4272
4018
  };
4273
-
4274
4019
  __proto.change = function (input, event, offset, useAnimation) {
4275
4020
  if (this._isStopped || !this._interruptManager.isInterrupting() || this._axisManager.every(offset, function (v) {
4276
4021
  return v === 0;
4277
4022
  })) {
4278
4023
  return;
4279
4024
  }
4280
-
4281
4025
  var nativeEvent = event.srcEvent ? event.srcEvent : event;
4282
-
4283
4026
  if (nativeEvent.__childrenAxesAlreadyChanged) {
4284
4027
  return;
4285
4028
  }
4286
-
4287
4029
  var depaPos = this._moveDistance || this._axisManager.get(input.axes);
4288
-
4289
- var destPos; // for outside logic
4290
-
4030
+ var destPos;
4031
+ // for outside logic
4291
4032
  destPos = map(depaPos, function (v, k) {
4292
4033
  return v + (offset[k] || 0);
4293
4034
  });
4294
-
4295
4035
  if (this._moveDistance) {
4296
4036
  this._moveDistance = this._axisManager.map(destPos, function (v, _a) {
4297
4037
  var circular = _a.circular,
4298
- range = _a.range;
4038
+ range = _a.range;
4299
4039
  return circular && (circular[0] || circular[1]) ? getCirculatedPos(v, range, circular) : v;
4300
4040
  });
4301
- } // from outside to inside
4302
-
4303
-
4041
+ }
4042
+ // from outside to inside
4304
4043
  if (this._isOutside && this._axisManager.every(depaPos, function (v, opt) {
4305
4044
  return !isOutside(v, opt.range);
4306
4045
  })) {
4307
4046
  this._isOutside = false;
4308
4047
  }
4309
-
4310
4048
  depaPos = this._atOutside(depaPos);
4311
4049
  destPos = this._atOutside(destPos);
4312
-
4313
4050
  if (!this.options.nested || !this._isEndofAxis(offset, depaPos, destPos)) {
4314
4051
  nativeEvent.__childrenAxesAlreadyChanged = true;
4315
4052
  }
4316
-
4317
4053
  var changeOption = {
4318
4054
  input: input,
4319
4055
  event: event
4320
4056
  };
4321
-
4322
4057
  if (useAnimation) {
4323
4058
  var duration = this._animationManager.getDuration(destPos, depaPos);
4324
-
4325
4059
  this._animationManager.animateTo(destPos, duration, changeOption);
4326
4060
  } else {
4327
4061
  var isCanceled = !this._eventManager.triggerChange(destPos, depaPos, changeOption, true);
4328
-
4329
4062
  if (isCanceled) {
4330
4063
  this._isStopped = true;
4331
4064
  this._moveDistance = null;
4332
-
4333
4065
  this._animationManager.finish(false);
4334
4066
  }
4335
4067
  }
4336
4068
  };
4337
-
4338
4069
  __proto.release = function (input, event, velocity, inputDuration) {
4339
4070
  if (this._isStopped || !this._interruptManager.isInterrupting() || !this._moveDistance) {
4340
4071
  return;
4341
4072
  }
4342
-
4343
4073
  var nativeEvent = event.srcEvent ? event.srcEvent : event;
4344
-
4345
4074
  if (nativeEvent.__childrenAxesAlreadyReleased) {
4346
4075
  velocity = velocity.map(function () {
4347
4076
  return 0;
4348
4077
  });
4349
4078
  }
4350
-
4351
4079
  var pos = this._axisManager.get(input.axes);
4352
-
4353
4080
  var depaPos = this._axisManager.get();
4354
-
4355
4081
  var displacement = this._animationManager.getDisplacement(velocity);
4356
-
4357
4082
  var offset = toAxis(input.axes, displacement);
4358
-
4359
4083
  var destPos = this._axisManager.get(this._axisManager.map(offset, function (v, opt, k) {
4360
4084
  if (opt.circular && (opt.circular[0] || opt.circular[1])) {
4361
4085
  return pos[k] + v;
@@ -4363,16 +4087,12 @@ version: 4.10.8-beta.1
4363
4087
  return getInsidePosition(pos[k] + v, opt.range, opt.circular, opt.bounce);
4364
4088
  }
4365
4089
  }));
4366
-
4367
4090
  nativeEvent.__childrenAxesAlreadyReleased = true;
4368
-
4369
4091
  var duration = this._animationManager.getDuration(destPos, pos, inputDuration);
4370
-
4371
4092
  if (duration === 0) {
4372
4093
  destPos = __assign$1({}, depaPos);
4373
- } // prepare params
4374
-
4375
-
4094
+ }
4095
+ // prepare params
4376
4096
  var param = {
4377
4097
  depaPos: depaPos,
4378
4098
  destPos: destPos,
@@ -4383,29 +4103,22 @@ version: 4.10.8-beta.1
4383
4103
  isTrusted: true
4384
4104
  };
4385
4105
  --this._eventManager.holdingCount;
4386
-
4387
4106
  this._eventManager.triggerRelease(param);
4388
-
4389
4107
  if (this._eventManager.holdingCount === 0) {
4390
4108
  this._moveDistance = null;
4391
- } // to contol
4392
-
4393
-
4109
+ }
4110
+ // to contol
4394
4111
  var userWish = this._animationManager.getUserControl(param);
4395
-
4396
4112
  var isEqual = equal(userWish.destPos, depaPos);
4397
4113
  var changeOption = {
4398
4114
  input: input,
4399
4115
  event: event
4400
4116
  };
4401
-
4402
4117
  if (isEqual || userWish.duration === 0) {
4403
4118
  if (!isEqual) {
4404
4119
  this._eventManager.triggerChange(userWish.destPos, depaPos, changeOption, true);
4405
4120
  }
4406
-
4407
4121
  this._interruptManager.setInterrupt(false);
4408
-
4409
4122
  if (this._axisManager.isOutside()) {
4410
4123
  this._animationManager.restore(changeOption);
4411
4124
  } else {
@@ -4414,12 +4127,10 @@ version: 4.10.8-beta.1
4414
4127
  } else {
4415
4128
  this._animationManager.animateTo(userWish.destPos, userWish.duration, changeOption);
4416
4129
  }
4417
- }; // when move pointer is held in outside
4418
-
4419
-
4130
+ };
4131
+ // when move pointer is held in outside
4420
4132
  __proto._atOutside = function (pos) {
4421
4133
  var _this = this;
4422
-
4423
4134
  if (this._isOutside) {
4424
4135
  return this._axisManager.map(pos, function (v, opt) {
4425
4136
  var tn = opt.range[0] - opt.bounce[0];
@@ -4432,7 +4143,6 @@ version: 4.10.8-beta.1
4432
4143
  var max = opt.range[1];
4433
4144
  var out = opt.bounce;
4434
4145
  var circular = opt.circular;
4435
-
4436
4146
  if (circular[0] && v < min || circular[1] && v > max) {
4437
4147
  return v;
4438
4148
  } else if (v < min) {
@@ -4442,47 +4152,37 @@ version: 4.10.8-beta.1
4442
4152
  // right
4443
4153
  return max + _this._animationManager.interpolate(v - max, out[1]);
4444
4154
  }
4445
-
4446
4155
  return v;
4447
4156
  });
4448
4157
  }
4449
4158
  };
4450
-
4451
4159
  __proto._isEndofAxis = function (offset, depaPos, destPos) {
4452
4160
  return this._axisManager.every(depaPos, function (value, option, key) {
4453
4161
  return offset[key] === 0 || depaPos[key] === destPos[key] && isEndofBounce(value, option.range, option.bounce, option.circular);
4454
4162
  });
4455
4163
  };
4456
-
4457
4164
  return InputObserver;
4458
4165
  }();
4459
4166
 
4460
4167
  var clamp = function (value, min, max) {
4461
4168
  return Math.max(Math.min(value, max), min);
4462
4169
  };
4463
-
4464
- var AnimationManager =
4465
- /*#__PURE__*/
4466
- function () {
4170
+ var AnimationManager = /*#__PURE__*/function () {
4467
4171
  function AnimationManager(_a) {
4468
4172
  var options = _a.options,
4469
- interruptManager = _a.interruptManager,
4470
- eventManager = _a.eventManager,
4471
- axisManager = _a.axisManager;
4173
+ interruptManager = _a.interruptManager,
4174
+ eventManager = _a.eventManager,
4175
+ axisManager = _a.axisManager;
4472
4176
  this._options = options;
4473
4177
  this.interruptManager = interruptManager;
4474
4178
  this.eventManager = eventManager;
4475
4179
  this.axisManager = axisManager;
4476
4180
  this.animationEnd = this.animationEnd.bind(this);
4477
4181
  }
4478
-
4479
4182
  var __proto = AnimationManager.prototype;
4480
-
4481
4183
  __proto.getDuration = function (depaPos, destPos, wishDuration) {
4482
4184
  var _this = this;
4483
-
4484
4185
  var duration;
4485
-
4486
4186
  if (typeof wishDuration !== "undefined") {
4487
4187
  duration = wishDuration;
4488
4188
  } else {
@@ -4493,10 +4193,8 @@ version: 4.10.8-beta.1
4493
4193
  return Math.max(max, durations_1[v]);
4494
4194
  }, -Infinity);
4495
4195
  }
4496
-
4497
4196
  return clamp(duration, this._options.minimumDuration, this._options.maximumDuration);
4498
4197
  };
4499
-
4500
4198
  __proto.getDisplacement = function (velocity) {
4501
4199
  var totalVelocity = Math.pow(velocity.reduce(function (total, v) {
4502
4200
  return total + v * v;
@@ -4506,31 +4204,25 @@ version: 4.10.8-beta.1
4506
4204
  return v / 2 * duration;
4507
4205
  });
4508
4206
  };
4509
-
4510
4207
  __proto.stopAnimation = function (option) {
4511
4208
  if (this._animateParam) {
4512
4209
  var orgPos_1 = this.axisManager.get();
4513
4210
  var pos = this.axisManager.map(orgPos_1, function (v, opt) {
4514
4211
  return getCirculatedPos(v, opt.range, opt.circular);
4515
4212
  });
4516
-
4517
4213
  if (!every(pos, function (v, k) {
4518
4214
  return orgPos_1[k] === v;
4519
4215
  })) {
4520
4216
  this.eventManager.triggerChange(pos, orgPos_1, option, !!option);
4521
4217
  }
4522
-
4523
4218
  this._animateParam = null;
4524
-
4525
4219
  if (this._raf) {
4526
4220
  cancelAnimationFrame(this._raf);
4527
4221
  }
4528
-
4529
4222
  this._raf = null;
4530
4223
  this.eventManager.triggerAnimationEnd(!!(option === null || option === void 0 ? void 0 : option.event));
4531
4224
  }
4532
4225
  };
4533
-
4534
4226
  __proto.getEventInfo = function () {
4535
4227
  if (this._animateParam && this._animateParam.input && this._animateParam.inputEvent) {
4536
4228
  return {
@@ -4541,7 +4233,6 @@ version: 4.10.8-beta.1
4541
4233
  return null;
4542
4234
  }
4543
4235
  };
4544
-
4545
4236
  __proto.restore = function (option) {
4546
4237
  var pos = this.axisManager.get();
4547
4238
  var destPos = this.axisManager.map(pos, function (v, opt) {
@@ -4550,66 +4241,53 @@ version: 4.10.8-beta.1
4550
4241
  this.stopAnimation();
4551
4242
  this.animateTo(destPos, this.getDuration(pos, destPos), option);
4552
4243
  };
4553
-
4554
4244
  __proto.animationEnd = function () {
4555
4245
  var beforeParam = this.getEventInfo();
4556
- this._animateParam = null; // for Circular
4557
-
4246
+ this._animateParam = null;
4247
+ // for Circular
4558
4248
  var circularTargets = this.axisManager.filter(this.axisManager.get(), function (v, opt) {
4559
4249
  return isCircularable(v, opt.range, opt.circular);
4560
4250
  });
4561
-
4562
4251
  if (Object.keys(circularTargets).length > 0) {
4563
4252
  this.setTo(this.axisManager.map(circularTargets, function (v, opt) {
4564
4253
  return getCirculatedPos(v, opt.range, opt.circular);
4565
4254
  }));
4566
4255
  }
4567
-
4568
4256
  this.interruptManager.setInterrupt(false);
4569
4257
  this.eventManager.triggerAnimationEnd(!!beforeParam);
4570
-
4571
4258
  if (this.axisManager.isOutside()) {
4572
4259
  this.restore(beforeParam);
4573
4260
  } else {
4574
4261
  this.finish(!!beforeParam);
4575
4262
  }
4576
4263
  };
4577
-
4578
4264
  __proto.finish = function (isTrusted) {
4579
4265
  this._animateParam = null;
4580
4266
  this.interruptManager.setInterrupt(false);
4581
4267
  this.eventManager.triggerFinish(isTrusted);
4582
4268
  };
4583
-
4584
4269
  __proto.getUserControl = function (param) {
4585
4270
  var userWish = param.setTo();
4586
4271
  userWish.destPos = this.axisManager.get(userWish.destPos);
4587
4272
  userWish.duration = clamp(userWish.duration, this._options.minimumDuration, this._options.maximumDuration);
4588
4273
  return userWish;
4589
4274
  };
4590
-
4591
4275
  __proto.animateTo = function (destPos, duration, option) {
4592
4276
  var _this = this;
4593
-
4594
4277
  this.stopAnimation();
4595
-
4596
4278
  var param = this._createAnimationParam(destPos, duration, option);
4597
-
4598
4279
  var depaPos = __assign$1({}, param.depaPos);
4599
-
4600
- var retTrigger = this.eventManager.triggerAnimationStart(param); // to control
4601
-
4602
- var userWish = this.getUserControl(param); // You can't stop the 'animationStart' event when 'circular' is true.
4603
-
4280
+ var retTrigger = this.eventManager.triggerAnimationStart(param);
4281
+ // to control
4282
+ var userWish = this.getUserControl(param);
4283
+ // You can't stop the 'animationStart' event when 'circular' is true.
4604
4284
  if (!retTrigger && this.axisManager.every(userWish.destPos, function (v, opt) {
4605
4285
  return isCircularable(v, opt.range, opt.circular);
4606
4286
  })) {
4607
4287
  console.warn("You can't stop the 'animation' event when 'circular' is true.");
4608
4288
  }
4609
-
4610
4289
  if (retTrigger && !equal(userWish.destPos, depaPos)) {
4611
4290
  var inputEvent = (option === null || option === void 0 ? void 0 : option.event) || null;
4612
-
4613
4291
  this._animateLoop({
4614
4292
  depaPos: depaPos,
4615
4293
  destPos: userWish.destPos,
@@ -4623,43 +4301,34 @@ version: 4.10.8-beta.1
4623
4301
  });
4624
4302
  }
4625
4303
  };
4626
-
4627
4304
  __proto.setTo = function (pos, duration) {
4628
4305
  if (duration === void 0) {
4629
4306
  duration = 0;
4630
4307
  }
4631
-
4632
4308
  var axes = Object.keys(pos);
4633
4309
  var orgPos = this.axisManager.get(axes);
4634
-
4635
4310
  if (equal(pos, orgPos)) {
4636
4311
  return this;
4637
4312
  }
4638
-
4639
4313
  this.interruptManager.setInterrupt(true);
4640
4314
  var movedPos = filter(pos, function (v, k) {
4641
4315
  return orgPos[k] !== v;
4642
4316
  });
4643
-
4644
4317
  if (!Object.keys(movedPos).length) {
4645
4318
  return this;
4646
4319
  }
4647
-
4648
4320
  movedPos = this.axisManager.map(movedPos, function (v, opt) {
4649
4321
  var range = opt.range,
4650
- circular = opt.circular;
4651
-
4322
+ circular = opt.circular;
4652
4323
  if (circular && (circular[0] || circular[1])) {
4653
4324
  return v;
4654
4325
  } else {
4655
4326
  return getInsidePosition(v, range, circular);
4656
4327
  }
4657
4328
  });
4658
-
4659
4329
  if (equal(movedPos, orgPos)) {
4660
4330
  return this;
4661
4331
  }
4662
-
4663
4332
  if (duration > 0) {
4664
4333
  this.animateTo(movedPos, duration);
4665
4334
  } else {
@@ -4667,20 +4336,16 @@ version: 4.10.8-beta.1
4667
4336
  this.eventManager.triggerChange(movedPos);
4668
4337
  this.finish(false);
4669
4338
  }
4670
-
4671
4339
  return this;
4672
4340
  };
4673
-
4674
4341
  __proto.setBy = function (pos, duration) {
4675
4342
  if (duration === void 0) {
4676
4343
  duration = 0;
4677
4344
  }
4678
-
4679
4345
  return this.setTo(map(this.axisManager.get(Object.keys(pos)), function (v, k) {
4680
4346
  return v + pos[k];
4681
4347
  }), duration);
4682
4348
  };
4683
-
4684
4349
  __proto._createAnimationParam = function (pos, duration, option) {
4685
4350
  var depaPos = this.axisManager.get();
4686
4351
  var destPos = pos;
@@ -4696,10 +4361,8 @@ version: 4.10.8-beta.1
4696
4361
  done: this.animationEnd
4697
4362
  };
4698
4363
  };
4699
-
4700
4364
  __proto._animateLoop = function (param, complete) {
4701
4365
  var _this = this;
4702
-
4703
4366
  if (param.duration) {
4704
4367
  this._animateParam = __assign$1(__assign$1({}, param), {
4705
4368
  startTime: new Date().getTime()
@@ -4707,25 +4370,18 @@ version: 4.10.8-beta.1
4707
4370
  var originalIntendedPos_1 = map(param.destPos, function (v) {
4708
4371
  return v;
4709
4372
  });
4710
-
4711
4373
  var state_1 = this._initState(this._animateParam);
4712
-
4713
4374
  var loop_1 = function () {
4714
4375
  _this._raf = null;
4715
4376
  var animateParam = _this._animateParam;
4716
-
4717
4377
  var nextState = _this._getNextState(state_1);
4718
-
4719
4378
  var isCanceled = !_this.eventManager.triggerChange(nextState.pos, state_1.pos);
4720
4379
  state_1 = nextState;
4721
-
4722
4380
  if (nextState.finished) {
4723
4381
  animateParam.destPos = _this._getFinalPos(animateParam.destPos, originalIntendedPos_1);
4724
-
4725
4382
  if (!equal(animateParam.destPos, _this.axisManager.get(Object.keys(animateParam.destPos)))) {
4726
4383
  _this.eventManager.triggerChange(animateParam.destPos, nextState.pos);
4727
4384
  }
4728
-
4729
4385
  complete();
4730
4386
  return;
4731
4387
  } else if (isCanceled) {
@@ -4734,30 +4390,26 @@ version: 4.10.8-beta.1
4734
4390
  _this._raf = requestAnimationFrame(loop_1);
4735
4391
  }
4736
4392
  };
4737
-
4738
4393
  loop_1();
4739
4394
  } else {
4740
4395
  this.eventManager.triggerChange(param.destPos);
4741
4396
  complete();
4742
4397
  }
4743
4398
  };
4744
- /**
4745
- * Get estimated final value.
4746
- *
4747
- * If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
4748
- * - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
4749
- * If dest Pos is outside the 'range of error' compared to the originally intended pos, it is returned rounded based on the originally intended pos.
4750
- * - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
4751
- * @param originalIntendedPos
4752
- * @param destPos
4399
+ /**
4400
+ * Get estimated final value.
4401
+ *
4402
+ * If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
4403
+ * - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
4404
+ * If dest Pos is outside the 'range of error' compared to the originally intended pos, it is returned rounded based on the originally intended pos.
4405
+ * - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
4406
+ * @param originalIntendedPos
4407
+ * @param destPos
4753
4408
  */
4754
-
4755
-
4756
4409
  __proto._getFinalPos = function (destPos, originalIntendedPos) {
4757
- var _this = this; // compare destPos and originalIntendedPos
4410
+ var _this = this;
4411
+ // compare destPos and originalIntendedPos
4758
4412
  // eslint-disable-next-line @typescript-eslint/naming-convention
4759
-
4760
-
4761
4413
  var ERROR_LIMIT = 0.000001;
4762
4414
  var finalPos = map(destPos, function (value, key) {
4763
4415
  if (value >= originalIntendedPos[key] - ERROR_LIMIT && value <= originalIntendedPos[key] + ERROR_LIMIT) {
@@ -4766,90 +4418,70 @@ version: 4.10.8-beta.1
4766
4418
  } else {
4767
4419
  // Out of error range, return rounded pos.
4768
4420
  var roundUnit = _this._getRoundUnit(value, key);
4769
-
4770
4421
  var result = roundNumber(value, roundUnit);
4771
4422
  return result;
4772
4423
  }
4773
4424
  });
4774
4425
  return finalPos;
4775
4426
  };
4776
-
4777
4427
  __proto._getRoundUnit = function (val, key) {
4778
4428
  var roundUnit = this._options.round; // manual mode
4779
-
4780
4429
  var minRoundUnit = null; // auto mode
4781
4430
  // auto mode
4782
-
4783
4431
  if (!roundUnit) {
4784
4432
  // Get minimum round unit
4785
4433
  var options = this.axisManager.getAxisOptions(key);
4786
4434
  minRoundUnit = inversePow(Math.max(getDecimalPlace(options.range[0]), getDecimalPlace(options.range[1]), getDecimalPlace(val)));
4787
4435
  }
4788
-
4789
4436
  return minRoundUnit || roundUnit;
4790
4437
  };
4791
-
4792
4438
  return AnimationManager;
4793
4439
  }();
4794
4440
 
4795
- var EasingManager =
4796
- /*#__PURE__*/
4797
- function (_super) {
4441
+ var EasingManager = /*#__PURE__*/function (_super) {
4798
4442
  __extends$1(EasingManager, _super);
4799
-
4800
4443
  function EasingManager() {
4801
4444
  var _this = _super !== null && _super.apply(this, arguments) || this;
4802
-
4803
4445
  _this._useDuration = true;
4804
4446
  return _this;
4805
4447
  }
4806
-
4807
4448
  var __proto = EasingManager.prototype;
4808
-
4809
4449
  __proto.interpolate = function (displacement, threshold) {
4810
4450
  var initSlope = this._easing(0.00001) / 0.00001;
4811
4451
  return this._easing(displacement / (threshold * initSlope)) * threshold;
4812
4452
  };
4813
-
4814
4453
  __proto.updateAnimation = function (options) {
4815
4454
  var _a;
4816
-
4817
4455
  var animateParam = this._animateParam;
4818
-
4819
4456
  if (!animateParam) {
4820
4457
  return;
4821
4458
  }
4822
-
4823
4459
  var diffTime = new Date().getTime() - animateParam.startTime;
4824
4460
  var pos = (options === null || options === void 0 ? void 0 : options.destPos) || animateParam.destPos;
4825
4461
  var duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : animateParam.duration;
4826
-
4827
4462
  if ((options === null || options === void 0 ? void 0 : options.restart) || duration <= diffTime) {
4828
4463
  this.setTo(pos, duration - diffTime);
4829
4464
  return;
4830
4465
  }
4831
-
4832
4466
  if (options === null || options === void 0 ? void 0 : options.destPos) {
4833
- var currentPos = this.axisManager.get(); // When destination is changed, new delta should be calculated as remaining percent.
4467
+ var currentPos = this.axisManager.get();
4468
+ // When destination is changed, new delta should be calculated as remaining percent.
4834
4469
  // For example, moving x:0, y:0 to x:200, y:200 and it has current easing percent of 92%. coordinate is x:184 and y:184
4835
4470
  // If destination changes to x:300, y:300. xdelta:200, ydelta:200 changes to xdelta:116, ydelta:116 and use remaining easingPer as 100%, not 8% as previous.
4836
4471
  // Therefore, original easingPer by time is kept. And divided by (1 - self._initialEasingPer) which means new total easing percent. Like calculating 8% as 100%.
4837
-
4838
4472
  this._initialEasingPer = this._prevEasingPer;
4839
4473
  animateParam.delta = this.axisManager.getDelta(currentPos, pos);
4840
4474
  animateParam.destPos = pos;
4841
4475
  }
4842
-
4843
4476
  if (options === null || options === void 0 ? void 0 : options.duration) {
4844
- var ratio = (diffTime + this._durationOffset) / animateParam.duration; // Use durationOffset for keeping animation ratio after duration is changed.
4477
+ var ratio = (diffTime + this._durationOffset) / animateParam.duration;
4478
+ // Use durationOffset for keeping animation ratio after duration is changed.
4845
4479
  // newRatio = (diffTime + newDurationOffset) / newDuration = oldRatio
4846
4480
  // newDurationOffset = oldRatio * newDuration - diffTime
4847
-
4848
4481
  this._durationOffset = ratio * duration - diffTime;
4849
4482
  animateParam.duration = duration;
4850
4483
  }
4851
4484
  };
4852
-
4853
4485
  __proto._initState = function (info) {
4854
4486
  this._initialEasingPer = 0;
4855
4487
  this._prevEasingPer = 0;
@@ -4860,10 +4492,8 @@ version: 4.10.8-beta.1
4860
4492
  finished: false
4861
4493
  };
4862
4494
  };
4863
-
4864
4495
  __proto._getNextState = function (prevState) {
4865
4496
  var _this = this;
4866
-
4867
4497
  var animateParam = this._animateParam;
4868
4498
  var prevPos = prevState.pos;
4869
4499
  var destPos = animateParam.destPos;
@@ -4872,23 +4502,19 @@ version: 4.10.8-beta.1
4872
4502
  });
4873
4503
  var diffTime = new Date().getTime() - animateParam.startTime;
4874
4504
  var ratio = (diffTime + this._durationOffset) / animateParam.duration;
4875
-
4876
4505
  var easingPer = this._easing(ratio);
4877
-
4878
4506
  var toPos = this.axisManager.map(prevPos, function (pos, options, key) {
4879
- var nextPos = ratio >= 1 ? destPos[key] : pos + animateParam.delta[key] * (easingPer - _this._prevEasingPer) / (1 - _this._initialEasingPer); // Subtract distance from distance already moved.
4507
+ var nextPos = ratio >= 1 ? destPos[key] : pos + animateParam.delta[key] * (easingPer - _this._prevEasingPer) / (1 - _this._initialEasingPer);
4508
+ // Subtract distance from distance already moved.
4880
4509
  // Recalculate the remaining distance.
4881
4510
  // Fix the bouncing phenomenon by changing the range.
4882
-
4883
4511
  var circulatedPos = getCirculatedPos(nextPos, options.range, options.circular);
4884
-
4885
4512
  if (nextPos !== circulatedPos) {
4886
4513
  // circular
4887
4514
  var rangeOffset = directions[key] * (options.range[1] - options.range[0]);
4888
4515
  destPos[key] -= rangeOffset;
4889
4516
  prevPos[key] -= rangeOffset;
4890
4517
  }
4891
-
4892
4518
  return circulatedPos;
4893
4519
  });
4894
4520
  this._prevEasingPer = easingPer;
@@ -4898,142 +4524,129 @@ version: 4.10.8-beta.1
4898
4524
  finished: easingPer >= 1
4899
4525
  };
4900
4526
  };
4901
-
4902
4527
  __proto._easing = function (p) {
4903
4528
  return p > 1 ? 1 : this._options.easing(p);
4904
4529
  };
4905
-
4906
4530
  return EasingManager;
4907
4531
  }(AnimationManager);
4908
4532
 
4909
- /**
4910
- * @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
4911
- * @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
4912
- * @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
4913
- * @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
4914
- * @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
4915
- * @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
4916
- * @param {Number[]} [bounce] The size of bouncing area. The coordinates can exceed the coordinate area as much as the bouncing area based on user action. If the coordinates does not exceed the bouncing area when an element is dragged, the coordinates where bouncing effects are applied are retuned back into the coordinate area<ko>바운스 영역의 크기. 사용자의 동작에 따라 좌표가 좌표 영역을 넘어 바운스 영역의 크기만큼 더 이동할 수 있다. 사용자가 끌어다 놓는 동작을 했을 때 좌표가 바운스 영역에 있으면, 바운스 효과가 적용된 좌표가 다시 좌표 영역 안으로 들어온다</ko>
4917
- * @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
4918
- * @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
4919
- * @param {Boolean[]} [circular] Indicates whether a circular element is available. If it is set to "true" and an element is dragged outside the coordinate area, the element will appear on the other side.<ko>순환 여부. 'true'로 설정한 방향의 좌표 영역 밖으로 엘리먼트가 이동하면 반대 방향에서 엘리먼트가 나타난다</ko>
4920
- * @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
4921
- * @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
4533
+ /**
4534
+ * @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
4535
+ * @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
4536
+ * @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
4537
+ * @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
4538
+ * @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
4539
+ * @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
4540
+ * @param {Number[]} [bounce] The size of bouncing area. The coordinates can exceed the coordinate area as much as the bouncing area based on user action. If the coordinates does not exceed the bouncing area when an element is dragged, the coordinates where bouncing effects are applied are retuned back into the coordinate area<ko>바운스 영역의 크기. 사용자의 동작에 따라 좌표가 좌표 영역을 넘어 바운스 영역의 크기만큼 더 이동할 수 있다. 사용자가 끌어다 놓는 동작을 했을 때 좌표가 바운스 영역에 있으면, 바운스 효과가 적용된 좌표가 다시 좌표 영역 안으로 들어온다</ko>
4541
+ * @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
4542
+ * @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
4543
+ * @param {Boolean[]} [circular] Indicates whether a circular element is available. If it is set to "true" and an element is dragged outside the coordinate area, the element will appear on the other side.<ko>순환 여부. 'true'로 설정한 방향의 좌표 영역 밖으로 엘리먼트가 이동하면 반대 방향에서 엘리먼트가 나타난다</ko>
4544
+ * @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
4545
+ * @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
4922
4546
  **/
4923
-
4924
- /**
4925
- * @typedef {Object} AxesOption The option object of the eg.Axes module
4926
- * @ko eg.Axes 모듈의 옵션 객체
4927
- * @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
4928
- * @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
4929
- * @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
4930
- * @param {Number} [deceleration=0.0006] Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time. <ko>사용자의 동작으로 가속도가 적용된 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아진다</ko>
4931
- * @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
4932
- * - true: It can be paused or stopped by user action or the API.
4933
- * - false: It cannot be paused or stopped by user action or the API while it is running.
4934
- * <ko>진행 중인 애니메이션 중지 가능 여부.
4935
- * - true: 사용자의 동작이나 API 애니메이션을 중지할 수 있다.
4936
- * - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
4937
- * @param {Number} [round=null] Rounding unit. For example, 0.1 rounds to 0.1 decimal point(6.1234 => 6.1), 5 rounds to 5 (93 => 95)
4938
- * [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
4939
- * [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
4940
- * @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
4547
+ /**
4548
+ * @typedef {Object} AxesOption The option object of the eg.Axes module
4549
+ * @ko eg.Axes 모듈의 옵션 객체
4550
+ * @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
4551
+ * @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
4552
+ * @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
4553
+ * @param {Number} [deceleration=0.0006] Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time. <ko>사용자의 동작으로 가속도가 적용된 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아진다</ko>
4554
+ * @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
4555
+ * - true: It can be paused or stopped by user action or the API.
4556
+ * - false: It cannot be paused or stopped by user action or the API while it is running.
4557
+ * <ko>진행 중인 애니메이션 중지 가능 여부.
4558
+ * - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
4559
+ * - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API 적용되지 않는다</ko>
4560
+ * @param {Number} [round=null] Rounding unit. For example, 0.1 rounds to 0.1 decimal point(6.1234 => 6.1), 5 rounds to 5 (93 => 95)
4561
+ * [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 5 단위로 반올림(93 => 95).
4562
+ * [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
4563
+ * @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
4941
4564
  **/
4942
-
4943
- /**
4944
- * A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.
4945
- * @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
4946
- * @extends eg.Component
4947
- *
4948
- * @param {Object.<string, AxisOption>} axis Axis information managed by eg.Axes. The key of the axis specifies the name to use as the logical virtual coordinate system. <ko>eg.Axes 관리하는 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.</ko>
4949
- * @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
4950
- * @param {Object.<string, number>} [startPos={}] The coordinates to be moved when creating an instance. It is applied with higher priority than startPos of axisOption.<ko>인스턴스 생성시 이동할 좌표, axisOption의 startPos보다 높은 우선순위로 적용된다.</ko>
4951
- *
4952
- * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
4953
- * @example
4954
- * ```js
4955
- * // 1. Initialize eg.Axes
4956
- * const axes = new eg.Axes({
4957
- * something1: {
4958
- * range: [0, 150],
4959
- * bounce: 50
4960
- * },
4961
- * something2: {
4962
- * range: [0, 200],
4963
- * bounce: 100
4964
- * },
4965
- * somethingN: {
4966
- * range: [1, 10],
4967
- * }
4968
- * }, {
4969
- * deceleration : 0.0024
4970
- * });
4971
- *
4972
- * // 2. attach event handler
4973
- * axes.on({
4974
- * "hold" : function(evt) {
4975
- * },
4976
- * "release" : function(evt) {
4977
- * },
4978
- * "animationStart" : function(evt) {
4979
- * },
4980
- * "animationEnd" : function(evt) {
4981
- * },
4982
- * "change" : function(evt) {
4983
- * }
4984
- * });
4985
- *
4986
- * // 3. Initialize inputTypes
4987
- * const panInputArea = new eg.Axes.PanInput("#area", {
4988
- * scale: [0.5, 1]
4989
- * });
4990
- * const panInputHmove = new eg.Axes.PanInput("#hmove");
4991
- * const panInputVmove = new eg.Axes.PanInput("#vmove");
4992
- * const pinchInputArea = new eg.Axes.PinchInput("#area", {
4993
- * scale: 1.5
4994
- * });
4995
- *
4996
- * // 4. Connect eg.Axes and InputTypes
4997
- * // [PanInput] When the mouse or touchscreen is down and moved.
4998
- * // Connect the 'something2' axis to the mouse or touchscreen x position and
4999
- * // connect the 'somethingN' axis to the mouse or touchscreen y position.
5000
- * axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
5001
- *
5002
- * // Connect only one 'something1' axis to the mouse or touchscreen x position.
5003
- * axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
5004
- *
5005
- * // Connect only one 'something2' axis to the mouse or touchscreen y position.
5006
- * axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
5007
- *
5008
- * // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
5009
- * axes.connect("something2", pinchInputArea);
5010
- * ```
4565
+ /**
4566
+ * A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.
4567
+ * @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI 손쉽게 만들수 있다.
4568
+ * @extends eg.Component
4569
+ *
4570
+ * @param {Object.<string, AxisOption>} axis Axis information managed by eg.Axes. The key of the axis specifies the name to use as the logical virtual coordinate system. <ko>eg.Axes가 관리하는 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.</ko>
4571
+ * @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
4572
+ * @param {Object.<string, number>} [startPos={}] The coordinates to be moved when creating an instance. It is applied with higher priority than startPos of axisOption.<ko>인스턴스 생성시 이동할 좌표, axisOption의 startPos보다 높은 우선순위로 적용된다.</ko>
4573
+ *
4574
+ * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
4575
+ * @example
4576
+ * ```js
4577
+ * // 1. Initialize eg.Axes
4578
+ * const axes = new eg.Axes({
4579
+ * something1: {
4580
+ * range: [0, 150],
4581
+ * bounce: 50
4582
+ * },
4583
+ * something2: {
4584
+ * range: [0, 200],
4585
+ * bounce: 100
4586
+ * },
4587
+ * somethingN: {
4588
+ * range: [1, 10],
4589
+ * }
4590
+ * }, {
4591
+ * deceleration : 0.0024
4592
+ * });
4593
+ *
4594
+ * // 2. attach event handler
4595
+ * axes.on({
4596
+ * "hold" : function(evt) {
4597
+ * },
4598
+ * "release" : function(evt) {
4599
+ * },
4600
+ * "animationStart" : function(evt) {
4601
+ * },
4602
+ * "animationEnd" : function(evt) {
4603
+ * },
4604
+ * "change" : function(evt) {
4605
+ * }
4606
+ * });
4607
+ *
4608
+ * // 3. Initialize inputTypes
4609
+ * const panInputArea = new eg.Axes.PanInput("#area", {
4610
+ * scale: [0.5, 1]
4611
+ * });
4612
+ * const panInputHmove = new eg.Axes.PanInput("#hmove");
4613
+ * const panInputVmove = new eg.Axes.PanInput("#vmove");
4614
+ * const pinchInputArea = new eg.Axes.PinchInput("#area", {
4615
+ * scale: 1.5
4616
+ * });
4617
+ *
4618
+ * // 4. Connect eg.Axes and InputTypes
4619
+ * // [PanInput] When the mouse or touchscreen is down and moved.
4620
+ * // Connect the 'something2' axis to the mouse or touchscreen x position and
4621
+ * // connect the 'somethingN' axis to the mouse or touchscreen y position.
4622
+ * axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
4623
+ *
4624
+ * // Connect only one 'something1' axis to the mouse or touchscreen x position.
4625
+ * axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
4626
+ *
4627
+ * // Connect only one 'something2' axis to the mouse or touchscreen y position.
4628
+ * axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
4629
+ *
4630
+ * // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
4631
+ * axes.connect("something2", pinchInputArea);
4632
+ * ```
5011
4633
  */
5012
-
5013
- var Axes =
5014
- /*#__PURE__*/
5015
- function (_super) {
4634
+ var Axes = /*#__PURE__*/function (_super) {
5016
4635
  __extends$1(Axes, _super);
5017
- /**
5018
- *
4636
+ /**
4637
+ *
5019
4638
  */
5020
-
5021
-
5022
4639
  function Axes(axis, options, startPos) {
5023
4640
  if (axis === void 0) {
5024
4641
  axis = {};
5025
4642
  }
5026
-
5027
4643
  if (options === void 0) {
5028
4644
  options = {};
5029
4645
  }
5030
-
5031
4646
  if (startPos === void 0) {
5032
4647
  startPos = {};
5033
4648
  }
5034
-
5035
4649
  var _this = _super.call(this) || this;
5036
-
5037
4650
  _this.axis = axis;
5038
4651
  _this._inputs = [];
5039
4652
  _this.options = __assign$1({
@@ -5055,33 +4668,29 @@ version: 4.10.8-beta.1
5055
4668
  _this.eventManager = new EventManager(_this);
5056
4669
  _this.animationManager = new EasingManager(_this);
5057
4670
  _this.inputObserver = new InputObserver(_this);
5058
-
5059
4671
  _this.eventManager.setAnimationManager(_this.animationManager);
5060
-
5061
4672
  _this.eventManager.triggerChange(_this.axisManager.get());
5062
-
5063
4673
  return _this;
5064
4674
  }
5065
-
5066
4675
  var __proto = Axes.prototype;
5067
4676
  Object.defineProperty(__proto, "holding", {
5068
- /**
5069
- * @name Axes#holding
5070
- * @desc Returns true if at least one input is in progress.
5071
- * @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
5072
- *
5073
- * @readonly
5074
- * @type {boolean}
5075
- * @example
5076
- * ```js
5077
- * const axes = new eg.Axes({
5078
- * x: {
5079
- * range: [0, 100],
5080
- * },
5081
- * });
5082
- *
5083
- * axes.holding
5084
- * ```
4677
+ /**
4678
+ * @name Axes#holding
4679
+ * @desc Returns true if at least one input is in progress.
4680
+ * @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
4681
+ *
4682
+ * @readonly
4683
+ * @type {boolean}
4684
+ * @example
4685
+ * ```js
4686
+ * const axes = new eg.Axes({
4687
+ * x: {
4688
+ * range: [0, 100],
4689
+ * },
4690
+ * });
4691
+ *
4692
+ * axes.holding
4693
+ * ```
5085
4694
  */
5086
4695
  get: function () {
5087
4696
  return this.eventManager.holdingCount > 0;
@@ -5089,551 +4698,499 @@ version: 4.10.8-beta.1
5089
4698
  enumerable: false,
5090
4699
  configurable: true
5091
4700
  });
5092
- /**
5093
- * Connect the axis of eg.Axes to the inputType.
5094
- * @ko eg.Axes의 축과 inputType을 연결한다
5095
- * @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
5096
- * @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
5097
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5098
- * @example
5099
- * ```js
5100
- * const axes = new eg.Axes({
5101
- * "x": {
5102
- * range: [0, 100]
5103
- * },
5104
- * "xOther": {
5105
- * range: [-100, 100]
5106
- * }
5107
- * });
5108
- *
5109
- * axes.connect("x", new eg.Axes.PanInput("#area1"))
5110
- * .connect("x xOther", new eg.Axes.PanInput("#area2"))
5111
- * .connect(" xOther", new eg.Axes.PanInput("#area3"))
5112
- * .connect(["x"], new eg.Axes.PanInput("#area4"))
5113
- * .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
5114
- * .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
5115
- * ```
4701
+ /**
4702
+ * Connect the axis of eg.Axes to the inputType.
4703
+ * @ko eg.Axes의 축과 inputType을 연결한다
4704
+ * @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
4705
+ * @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
4706
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4707
+ * @example
4708
+ * ```js
4709
+ * const axes = new eg.Axes({
4710
+ * "x": {
4711
+ * range: [0, 100]
4712
+ * },
4713
+ * "xOther": {
4714
+ * range: [-100, 100]
4715
+ * }
4716
+ * });
4717
+ *
4718
+ * axes.connect("x", new eg.Axes.PanInput("#area1"))
4719
+ * .connect("x xOther", new eg.Axes.PanInput("#area2"))
4720
+ * .connect(" xOther", new eg.Axes.PanInput("#area3"))
4721
+ * .connect(["x"], new eg.Axes.PanInput("#area4"))
4722
+ * .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
4723
+ * .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
4724
+ * ```
5116
4725
  */
5117
-
5118
4726
  __proto.connect = function (axes, inputType) {
5119
4727
  var mapped;
5120
-
5121
4728
  if (typeof axes === "string") {
5122
4729
  mapped = axes.split(" ");
5123
4730
  } else {
5124
4731
  mapped = axes.concat();
5125
- } // check same instance
5126
-
5127
-
4732
+ }
4733
+ // check same instance
5128
4734
  if (~this._inputs.indexOf(inputType)) {
5129
4735
  this.disconnect(inputType);
5130
4736
  }
5131
-
5132
4737
  inputType.mapAxes(mapped);
5133
4738
  inputType.connect(this.inputObserver);
5134
-
5135
4739
  this._inputs.push(inputType);
5136
-
5137
4740
  return this;
5138
4741
  };
5139
- /**
5140
- * Disconnect the axis of eg.Axes from the inputType.
5141
- * @ko eg.Axes의 축과 inputType의 연결을 끊는다.
5142
- * @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
5143
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5144
- * @example
5145
- * ```js
5146
- * const axes = new eg.Axes({
5147
- * "x": {
5148
- * range: [0, 100]
5149
- * },
5150
- * "xOther": {
5151
- * range: [-100, 100]
5152
- * }
5153
- * });
5154
- *
5155
- * const input1 = new eg.Axes.PanInput("#area1");
5156
- * const input2 = new eg.Axes.PanInput("#area2");
5157
- * const input3 = new eg.Axes.PanInput("#area3");
5158
- *
5159
- * axes.connect("x", input1);
5160
- * .connect("x xOther", input2)
5161
- * .connect(["xOther", "x"], input3);
5162
- *
5163
- * axes.disconnect(input1); // disconnects input1
5164
- * axes.disconnect(); // disconnects all of them
5165
- * ```
4742
+ /**
4743
+ * Disconnect the axis of eg.Axes from the inputType.
4744
+ * @ko eg.Axes의 축과 inputType의 연결을 끊는다.
4745
+ * @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
4746
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4747
+ * @example
4748
+ * ```js
4749
+ * const axes = new eg.Axes({
4750
+ * "x": {
4751
+ * range: [0, 100]
4752
+ * },
4753
+ * "xOther": {
4754
+ * range: [-100, 100]
4755
+ * }
4756
+ * });
4757
+ *
4758
+ * const input1 = new eg.Axes.PanInput("#area1");
4759
+ * const input2 = new eg.Axes.PanInput("#area2");
4760
+ * const input3 = new eg.Axes.PanInput("#area3");
4761
+ *
4762
+ * axes.connect("x", input1);
4763
+ * .connect("x xOther", input2)
4764
+ * .connect(["xOther", "x"], input3);
4765
+ *
4766
+ * axes.disconnect(input1); // disconnects input1
4767
+ * axes.disconnect(); // disconnects all of them
4768
+ * ```
5166
4769
  */
5167
-
5168
-
5169
4770
  __proto.disconnect = function (inputType) {
5170
4771
  if (inputType) {
5171
4772
  var index = this._inputs.indexOf(inputType);
5172
-
5173
4773
  if (index >= 0) {
5174
4774
  this._inputs[index].disconnect();
5175
-
5176
4775
  this._inputs.splice(index, 1);
5177
4776
  }
5178
4777
  } else {
5179
4778
  this._inputs.forEach(function (v) {
5180
4779
  return v.disconnect();
5181
4780
  });
5182
-
5183
4781
  this._inputs = [];
5184
4782
  }
5185
-
5186
4783
  return this;
5187
4784
  };
5188
- /**
5189
- * Returns the current position of the coordinates.
5190
- * @ko 좌표의 현재 위치를 반환한다
5191
- * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
5192
- * @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
5193
- * @example
5194
- * ```js
5195
- * const axes = new eg.Axes({
5196
- * "x": {
5197
- * range: [0, 100]
5198
- * },
5199
- * "xOther": {
5200
- * range: [-100, 100]
5201
- * },
5202
- * "zoom": {
5203
- * range: [50, 30]
5204
- * }
5205
- * });
5206
- *
5207
- * axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
5208
- * axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
5209
- * ```
4785
+ /**
4786
+ * Returns the current position of the coordinates.
4787
+ * @ko 좌표의 현재 위치를 반환한다
4788
+ * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
4789
+ * @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
4790
+ * @example
4791
+ * ```js
4792
+ * const axes = new eg.Axes({
4793
+ * "x": {
4794
+ * range: [0, 100]
4795
+ * },
4796
+ * "xOther": {
4797
+ * range: [-100, 100]
4798
+ * },
4799
+ * "zoom": {
4800
+ * range: [50, 30]
4801
+ * }
4802
+ * });
4803
+ *
4804
+ * axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
4805
+ * axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
4806
+ * ```
5210
4807
  */
5211
-
5212
-
5213
4808
  __proto.get = function (axes) {
5214
4809
  return this.axisManager.get(axes);
5215
4810
  };
5216
- /**
5217
- * Moves an axis to specific coordinates.
5218
- * @ko 좌표를 이동한다.
5219
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
5220
- * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
5221
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5222
- * @example
5223
- * ```js
5224
- * const axes = new eg.Axes({
5225
- * "x": {
5226
- * range: [0, 100]
5227
- * },
5228
- * "xOther": {
5229
- * range: [-100, 100]
5230
- * },
5231
- * "zoom": {
5232
- * range: [50, 30]
5233
- * }
5234
- * });
5235
- *
5236
- * axes.setTo({"x": 30, "zoom": 60});
5237
- * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
5238
- *
5239
- * axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
5240
- *
5241
- * // after 1000 ms
5242
- * axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
5243
- * ```
4811
+ /**
4812
+ * Moves an axis to specific coordinates.
4813
+ * @ko 좌표를 이동한다.
4814
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
4815
+ * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
4816
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4817
+ * @example
4818
+ * ```js
4819
+ * const axes = new eg.Axes({
4820
+ * "x": {
4821
+ * range: [0, 100]
4822
+ * },
4823
+ * "xOther": {
4824
+ * range: [-100, 100]
4825
+ * },
4826
+ * "zoom": {
4827
+ * range: [50, 30]
4828
+ * }
4829
+ * });
4830
+ *
4831
+ * axes.setTo({"x": 30, "zoom": 60});
4832
+ * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
4833
+ *
4834
+ * axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
4835
+ *
4836
+ * // after 1000 ms
4837
+ * axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
4838
+ * ```
5244
4839
  */
5245
-
5246
-
5247
4840
  __proto.setTo = function (pos, duration) {
5248
4841
  if (duration === void 0) {
5249
4842
  duration = 0;
5250
4843
  }
5251
-
5252
4844
  this.animationManager.setTo(pos, duration);
5253
4845
  return this;
5254
4846
  };
5255
- /**
5256
- * Moves an axis from the current coordinates to specific coordinates.
5257
- * @ko 현재 좌표를 기준으로 좌표를 이동한다.
5258
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
5259
- * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
5260
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5261
- * @example
5262
- * ```js
5263
- * const axes = new eg.Axes({
5264
- * "x": {
5265
- * range: [0, 100]
5266
- * },
5267
- * "xOther": {
5268
- * range: [-100, 100]
5269
- * },
5270
- * "zoom": {
5271
- * range: [50, 30]
5272
- * }
5273
- * });
5274
- *
5275
- * axes.setBy({"x": 30, "zoom": 10});
5276
- * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
5277
- *
5278
- * axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
5279
- *
5280
- * // after 1000 ms
5281
- * axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
5282
- * ```
4847
+ /**
4848
+ * Moves an axis from the current coordinates to specific coordinates.
4849
+ * @ko 현재 좌표를 기준으로 좌표를 이동한다.
4850
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
4851
+ * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
4852
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4853
+ * @example
4854
+ * ```js
4855
+ * const axes = new eg.Axes({
4856
+ * "x": {
4857
+ * range: [0, 100]
4858
+ * },
4859
+ * "xOther": {
4860
+ * range: [-100, 100]
4861
+ * },
4862
+ * "zoom": {
4863
+ * range: [50, 30]
4864
+ * }
4865
+ * });
4866
+ *
4867
+ * axes.setBy({"x": 30, "zoom": 10});
4868
+ * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
4869
+ *
4870
+ * axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
4871
+ *
4872
+ * // after 1000 ms
4873
+ * axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
4874
+ * ```
5283
4875
  */
5284
-
5285
-
5286
4876
  __proto.setBy = function (pos, duration) {
5287
4877
  if (duration === void 0) {
5288
4878
  duration = 0;
5289
4879
  }
5290
-
5291
4880
  this.animationManager.setBy(pos, duration);
5292
4881
  return this;
5293
4882
  };
5294
- /**
5295
- * Change the options of Axes instance.
5296
- * @ko 인스턴스의 옵션을 변경한다.
5297
- * @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
5298
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5299
- * @example
5300
- * ```js
5301
- * const axes = new eg.Axes({
5302
- * "x": {
5303
- * range: [0, 100]
5304
- * },
5305
- * }, {
5306
- * round: 10,
5307
- * });
5308
- *
5309
- * axes.setTo({"x": 48});
5310
- * axes.get(); // {"x": 50}
5311
- *
5312
- * axes.setOptions({
5313
- * round: 1,
5314
- * });
5315
- *
5316
- * axes.setTo({"x": 48});
5317
- * axes.get(); // {"x": 48}
5318
- * ```
4883
+ /**
4884
+ * Change the options of Axes instance.
4885
+ * @ko 인스턴스의 옵션을 변경한다.
4886
+ * @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
4887
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4888
+ * @example
4889
+ * ```js
4890
+ * const axes = new eg.Axes({
4891
+ * "x": {
4892
+ * range: [0, 100]
4893
+ * },
4894
+ * }, {
4895
+ * round: 10,
4896
+ * });
4897
+ *
4898
+ * axes.setTo({"x": 48});
4899
+ * axes.get(); // {"x": 50}
4900
+ *
4901
+ * axes.setOptions({
4902
+ * round: 1,
4903
+ * });
4904
+ *
4905
+ * axes.setTo({"x": 48});
4906
+ * axes.get(); // {"x": 48}
4907
+ * ```
5319
4908
  */
5320
-
5321
-
5322
4909
  __proto.setOptions = function (options) {
5323
4910
  this.options = __assign$1(__assign$1({}, this.options), options);
5324
4911
  return this;
5325
4912
  };
5326
- /**
5327
- * Change the information of an existing axis.
5328
- * @ko 존재하는 축의 정보를 변경한다.
5329
- * @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
5330
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5331
- * @example
5332
- * ```js
5333
- * const axes = new eg.Axes({
5334
- * "x": {
5335
- * range: [0, 100]
5336
- * },
5337
- * });
5338
- *
5339
- * axes.setTo({"x": 150});
5340
- * axes.get(); // {"x": 100}
5341
- *
5342
- * axes.setAxis({
5343
- * "x": {
5344
- * range: [0, 200]
5345
- * },
5346
- * });
5347
- *
5348
- * axes.setTo({"x": 150});
5349
- * axes.get(); // {"x": 150}
5350
- * ```
4913
+ /**
4914
+ * Change the information of an existing axis.
4915
+ * @ko 존재하는 축의 정보를 변경한다.
4916
+ * @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
4917
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4918
+ * @example
4919
+ * ```js
4920
+ * const axes = new eg.Axes({
4921
+ * "x": {
4922
+ * range: [0, 100]
4923
+ * },
4924
+ * });
4925
+ *
4926
+ * axes.setTo({"x": 150});
4927
+ * axes.get(); // {"x": 100}
4928
+ *
4929
+ * axes.setAxis({
4930
+ * "x": {
4931
+ * range: [0, 200]
4932
+ * },
4933
+ * });
4934
+ *
4935
+ * axes.setTo({"x": 150});
4936
+ * axes.get(); // {"x": 150}
4937
+ * ```
5351
4938
  */
5352
-
5353
-
5354
4939
  __proto.setAxis = function (axis) {
5355
4940
  this.axisManager.setAxis(axis);
5356
4941
  return this;
5357
4942
  };
5358
- /**
5359
- * Stop an animation in progress.
5360
- * @ko 재생 중인 애니메이션을 정지한다.
5361
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5362
- * @example
5363
- * ```js
5364
- * const axes = new eg.Axes({
5365
- * "x": {
5366
- * range: [0, 100]
5367
- * },
5368
- * });
5369
- *
5370
- * axes.setTo({"x": 10}, 1000); // start animatation
5371
- *
5372
- * // after 500 ms
5373
- * axes.stopAnimation(); // stop animation during movement.
5374
- * ```
4943
+ /**
4944
+ * Stop an animation in progress.
4945
+ * @ko 재생 중인 애니메이션을 정지한다.
4946
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4947
+ * @example
4948
+ * ```js
4949
+ * const axes = new eg.Axes({
4950
+ * "x": {
4951
+ * range: [0, 100]
4952
+ * },
4953
+ * });
4954
+ *
4955
+ * axes.setTo({"x": 10}, 1000); // start animatation
4956
+ *
4957
+ * // after 500 ms
4958
+ * axes.stopAnimation(); // stop animation during movement.
4959
+ * ```
5375
4960
  */
5376
-
5377
-
5378
4961
  __proto.stopAnimation = function () {
5379
4962
  this.animationManager.stopAnimation();
5380
4963
  this.animationManager.finish(false);
5381
4964
  return this;
5382
4965
  };
5383
- /**
5384
- * Change the destination of an animation in progress.
5385
- * @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
5386
- * @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
5387
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5388
- * @example
5389
- * ```js
5390
- * const axes = new eg.Axes({
5391
- * "x": {
5392
- * range: [0, 200]
5393
- * },
5394
- * "y": {
5395
- * range: [0, 200]
5396
- * }
5397
- * });
5398
- *
5399
- * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
5400
- *
5401
- * // after 500 ms
5402
- * axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
5403
- *
5404
- * // after 500 ms
5405
- * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
5406
- *
5407
- * // after 700 ms
5408
- * axes.updateAnimation({destPos: {"x": 100, "y": 100}, duration: 1500, restart: true}); // this works same as axes.setTo({"x": 100, "y": 100}, 800) since restart is true.
5409
- * ```
4966
+ /**
4967
+ * Change the destination of an animation in progress.
4968
+ * @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
4969
+ * @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
4970
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4971
+ * @example
4972
+ * ```js
4973
+ * const axes = new eg.Axes({
4974
+ * "x": {
4975
+ * range: [0, 200]
4976
+ * },
4977
+ * "y": {
4978
+ * range: [0, 200]
4979
+ * }
4980
+ * });
4981
+ *
4982
+ * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
4983
+ *
4984
+ * // after 500 ms
4985
+ * axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
4986
+ *
4987
+ * // after 500 ms
4988
+ * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
4989
+ *
4990
+ * // after 700 ms
4991
+ * axes.updateAnimation({destPos: {"x": 100, "y": 100}, duration: 1500, restart: true}); // this works same as axes.setTo({"x": 100, "y": 100}, 800) since restart is true.
4992
+ * ```
5410
4993
  */
5411
-
5412
-
5413
4994
  __proto.updateAnimation = function (options) {
5414
4995
  this.animationManager.updateAnimation(options);
5415
4996
  return this;
5416
4997
  };
5417
- /**
5418
- * Returns whether there is a coordinate in the bounce area of ​​the target axis.
5419
- * @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
5420
- * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
5421
- * @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
5422
- * @example
5423
- * ```js
5424
- * const axes = new eg.Axes({
5425
- * "x": {
5426
- * range: [0, 100]
5427
- * },
5428
- * "xOther": {
5429
- * range: [-100, 100]
5430
- * },
5431
- * "zoom": {
5432
- * range: [50, 30]
5433
- * }
5434
- * });
5435
- *
5436
- * axes.isBounceArea(["x"]);
5437
- * axes.isBounceArea(["x", "zoom"]);
5438
- * axes.isBounceArea();
5439
- * ```
4998
+ /**
4999
+ * Returns whether there is a coordinate in the bounce area of ​​the target axis.
5000
+ * @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
5001
+ * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
5002
+ * @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
5003
+ * @example
5004
+ * ```js
5005
+ * const axes = new eg.Axes({
5006
+ * "x": {
5007
+ * range: [0, 100]
5008
+ * },
5009
+ * "xOther": {
5010
+ * range: [-100, 100]
5011
+ * },
5012
+ * "zoom": {
5013
+ * range: [50, 30]
5014
+ * }
5015
+ * });
5016
+ *
5017
+ * axes.isBounceArea(["x"]);
5018
+ * axes.isBounceArea(["x", "zoom"]);
5019
+ * axes.isBounceArea();
5020
+ * ```
5440
5021
  */
5441
-
5442
-
5443
5022
  __proto.isBounceArea = function (axes) {
5444
5023
  return this.axisManager.isOutside(axes);
5445
5024
  };
5446
- /**
5447
- * Destroys properties, and events used in a module and disconnect all connections to inputTypes.
5448
- * @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
5025
+ /**
5026
+ * Destroys properties, and events used in a module and disconnect all connections to inputTypes.
5027
+ * @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
5449
5028
  */
5450
-
5451
-
5452
5029
  __proto.destroy = function () {
5453
5030
  this.disconnect();
5454
5031
  this.eventManager.destroy();
5455
5032
  };
5456
- /**
5457
- * @name VERSION
5458
- * @desc Version info string
5459
- * @ko 버전정보 문자열
5460
- *
5461
- * @constant
5462
- * @type {String}
5463
- * @example
5464
- * ```js
5465
- * eg.Axes.VERSION; // ex) 3.3.3
5466
- * ```
5033
+ /**
5034
+ * @name VERSION
5035
+ * @desc Version info string
5036
+ * @ko 버전정보 문자열
5037
+ *
5038
+ * @constant
5039
+ * @type {String}
5040
+ * @example
5041
+ * ```js
5042
+ * eg.Axes.VERSION; // ex) 3.3.3
5043
+ * ```
5467
5044
  */
5468
-
5469
-
5470
5045
  Axes.VERSION = "3.8.4";
5471
5046
  /* eslint-enable */
5472
-
5473
- /**
5474
- * @name TRANSFORM
5475
- * @desc Returns the transform attribute with CSS vendor prefixes.
5476
- * @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
5477
- *
5478
- * @constant
5479
- * @type {String}
5480
- * @example
5481
- * ```js
5482
- * eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
5483
- * ```
5047
+ /**
5048
+ * @name TRANSFORM
5049
+ * @desc Returns the transform attribute with CSS vendor prefixes.
5050
+ * @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
5051
+ *
5052
+ * @constant
5053
+ * @type {String}
5054
+ * @example
5055
+ * ```js
5056
+ * eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
5057
+ * ```
5484
5058
  */
5485
-
5486
5059
  Axes.TRANSFORM = TRANSFORM;
5487
- /**
5488
- * @name DIRECTION_NONE
5489
- * @constant
5490
- * @type {Number}
5060
+ /**
5061
+ * @name DIRECTION_NONE
5062
+ * @constant
5063
+ * @type {Number}
5491
5064
  */
5492
-
5493
5065
  Axes.DIRECTION_NONE = DIRECTION_NONE;
5494
- /**
5495
- * @name DIRECTION_LEFT
5496
- * @constant
5497
- * @type {Number}
5066
+ /**
5067
+ * @name DIRECTION_LEFT
5068
+ * @constant
5069
+ * @type {Number}
5498
5070
  */
5499
-
5500
5071
  Axes.DIRECTION_LEFT = DIRECTION_LEFT;
5501
- /**
5502
- * @name DIRECTION_RIGHT
5503
- * @constant
5504
- * @type {Number}
5072
+ /**
5073
+ * @name DIRECTION_RIGHT
5074
+ * @constant
5075
+ * @type {Number}
5505
5076
  */
5506
-
5507
5077
  Axes.DIRECTION_RIGHT = DIRECTION_RIGHT;
5508
- /**
5509
- * @name DIRECTION_UP
5510
- * @constant
5511
- * @type {Number}
5078
+ /**
5079
+ * @name DIRECTION_UP
5080
+ * @constant
5081
+ * @type {Number}
5512
5082
  */
5513
-
5514
5083
  Axes.DIRECTION_UP = DIRECTION_UP;
5515
- /**
5516
- * @name DIRECTION_DOWN
5517
- * @constant
5518
- * @type {Number}
5084
+ /**
5085
+ * @name DIRECTION_DOWN
5086
+ * @constant
5087
+ * @type {Number}
5519
5088
  */
5520
-
5521
5089
  Axes.DIRECTION_DOWN = DIRECTION_DOWN;
5522
- /**
5523
- * @name DIRECTION_HORIZONTAL
5524
- * @constant
5525
- * @type {Number}
5090
+ /**
5091
+ * @name DIRECTION_HORIZONTAL
5092
+ * @constant
5093
+ * @type {Number}
5526
5094
  */
5527
-
5528
5095
  Axes.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;
5529
- /**
5530
- * @name DIRECTION_VERTICAL
5531
- * @constant
5532
- * @type {Number}
5096
+ /**
5097
+ * @name DIRECTION_VERTICAL
5098
+ * @constant
5099
+ * @type {Number}
5533
5100
  */
5534
-
5535
5101
  Axes.DIRECTION_VERTICAL = DIRECTION_VERTICAL;
5536
- /**
5537
- * @name DIRECTION_ALL
5538
- * @constant
5539
- * @type {Number}
5102
+ /**
5103
+ * @name DIRECTION_ALL
5104
+ * @constant
5105
+ * @type {Number}
5540
5106
  */
5541
-
5542
5107
  Axes.DIRECTION_ALL = DIRECTION_ALL;
5543
-
5544
5108
  __decorate([Computed], Axes.prototype, "holding", null);
5545
-
5546
5109
  Axes = __decorate([ReactiveSubscribe], Axes);
5547
5110
  return Axes;
5548
5111
  }(Component);
5549
5112
 
5550
- /*
5551
- * Copyright (c) 2015 NAVER Corp.
5552
- * egjs projects are licensed under the MIT license
5113
+ /*
5114
+ * Copyright (c) 2015 NAVER Corp.
5115
+ * egjs projects are licensed under the MIT license
5553
5116
  */
5554
-
5117
+ // get user's direction
5555
5118
  var getDirectionByAngle = function (angle, thresholdAngle) {
5556
5119
  if (thresholdAngle < 0 || thresholdAngle > 90) {
5557
5120
  return DIRECTION_NONE;
5558
5121
  }
5559
-
5560
5122
  var toAngle = Math.abs(angle);
5561
5123
  return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
5562
5124
  };
5563
- /**
5564
- * @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
5565
- * @ko eg.Axes.PanInput 모듈의 옵션 객체
5566
- * @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
5567
- * - touch: Touch screen
5568
- * - mouse: Mouse
5569
- * - pointer: Mouse and touch <ko>입력 장치 종류
5570
- * - touch: 터치 입력 장치
5571
- * - mouse: 마우스
5572
- * - pointer: 마우스 및 터치</ko>
5573
- * @param {String[]} [inputKey=["any"]] List of key combinations to allow input
5574
- * - any: any key
5575
- * - shift: shift key
5576
- * - ctrl: ctrl key and pinch gesture on the trackpad
5577
- * - alt: alt key
5578
- * - meta: meta key
5579
- * - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
5580
- * - any: 아무 키
5581
- * - shift: shift 키
5582
- * - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
5583
- * - alt: alt 키
5584
- * - meta: meta 키
5585
- * - none: 아무 키도 눌리지 않은 상태 </ko>
5586
- * @param {String[]} [inputButton=["left"]] List of buttons to allow input
5587
- * - left: Left mouse button and normal touch
5588
- * - middle: Mouse wheel press
5589
- * - right: Right mouse button <ko>입력을 허용할 버튼 목록
5590
- * - left: 마우스 왼쪽 버튼
5591
- * - middle: 마우스 휠 눌림
5592
- * - right: 마우스 오른쪽 버튼 </ko>
5593
- * @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
5594
- * @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
5595
- * @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
5596
- * @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
5597
- * @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
5598
- * @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>
5599
- * @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>
5600
- * @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>
5125
+ /**
5126
+ * @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
5127
+ * @ko eg.Axes.PanInput 모듈의 옵션 객체
5128
+ * @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
5129
+ * - touch: Touch screen
5130
+ * - mouse: Mouse
5131
+ * - pointer: Mouse and touch <ko>입력 장치 종류
5132
+ * - touch: 터치 입력 장치
5133
+ * - mouse: 마우스
5134
+ * - pointer: 마우스 및 터치</ko>
5135
+ * @param {String[]} [inputKey=["any"]] List of key combinations to allow input
5136
+ * - any: any key
5137
+ * - shift: shift key
5138
+ * - ctrl: ctrl key and pinch gesture on the trackpad
5139
+ * - alt: alt key
5140
+ * - meta: meta key
5141
+ * - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
5142
+ * - any: 아무 키
5143
+ * - shift: shift 키
5144
+ * - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
5145
+ * - alt: alt 키
5146
+ * - meta: meta 키
5147
+ * - none: 아무 키도 눌리지 않은 상태 </ko>
5148
+ * @param {String[]} [inputButton=["left"]] List of buttons to allow input
5149
+ * - left: Left mouse button and normal touch
5150
+ * - middle: Mouse wheel press
5151
+ * - right: Right mouse button <ko>입력을 허용할 버튼 목록
5152
+ * - left: 마우스 왼쪽 버튼
5153
+ * - middle: 마우스 휠 눌림
5154
+ * - right: 마우스 오른쪽 버튼 </ko>
5155
+ * @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
5156
+ * @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
5157
+ * @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
5158
+ * @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
5159
+ * @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
5160
+ * @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>
5161
+ * @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
+ * @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>
5601
5163
  **/
5602
-
5603
- /**
5604
- * A module that passes the amount of change to eg.Axes when the mouse or touchscreen is down and moved. use less than two axes.
5605
- * @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
5606
- *
5607
- * @example
5608
- * ```js
5609
- * const pan = new eg.Axes.PanInput("#area", {
5610
- * inputType: ["touch"],
5611
- * scale: [1, 1.3],
5612
- * });
5613
- *
5614
- * // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5615
- * // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5616
- * axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
5617
- *
5618
- * // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5619
- * axes.connect(["something1"], pan); // or axes.connect("something1", pan);
5620
- *
5621
- * // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5622
- * axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
5623
- * ```
5624
- * @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
5625
- * @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
5164
+ /**
5165
+ * A module that passes the amount of change to eg.Axes when the mouse or touchscreen is down and moved. use less than two axes.
5166
+ * @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes 전달하는 모듈. 두개 이하의 축을 사용한다.
5167
+ *
5168
+ * @example
5169
+ * ```js
5170
+ * const pan = new eg.Axes.PanInput("#area", {
5171
+ * inputType: ["touch"],
5172
+ * scale: [1, 1.3],
5173
+ * });
5174
+ *
5175
+ * // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5176
+ * // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5177
+ * axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
5178
+ *
5179
+ * // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5180
+ * axes.connect(["something1"], pan); // or axes.connect("something1", pan);
5181
+ *
5182
+ * // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5183
+ * axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
5184
+ * ```
5185
+ * @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
5186
+ * @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
5626
5187
  */
5627
-
5628
- var PanInput =
5629
- /*#__PURE__*/
5630
- function () {
5631
- /**
5632
- *
5188
+ var PanInput = /*#__PURE__*/function () {
5189
+ /**
5190
+ *
5633
5191
  */
5634
5192
  function PanInput(el, options) {
5635
5193
  var _this = this;
5636
-
5637
5194
  this.axes = [];
5638
5195
  this.element = null;
5639
5196
  this._enabled = false;
@@ -5642,18 +5199,14 @@ version: 4.10.8-beta.1
5642
5199
  this._rightEdgeTimer = 0;
5643
5200
  this._dragged = false;
5644
5201
  this._isOverThreshold = false;
5645
-
5646
5202
  this._preventClickWhenDragged = function (e) {
5647
5203
  if (_this._dragged) {
5648
5204
  e.preventDefault();
5649
5205
  e.stopPropagation();
5650
5206
  }
5651
-
5652
5207
  _this._dragged = false;
5653
5208
  };
5654
-
5655
5209
  this._voidFunction = function () {};
5656
-
5657
5210
  this.element = $(el);
5658
5211
  this.options = __assign$1({
5659
5212
  inputType: ["touch", "mouse", "pointer"],
@@ -5671,167 +5224,128 @@ version: 4.10.8-beta.1
5671
5224
  this._onPanmove = this._onPanmove.bind(this);
5672
5225
  this._onPanend = this._onPanend.bind(this);
5673
5226
  }
5674
-
5675
5227
  var __proto = PanInput.prototype;
5676
-
5677
5228
  __proto.mapAxes = function (axes) {
5678
5229
  this._direction = getDirection(!!axes[0], !!axes[1]);
5679
5230
  this.axes = axes;
5680
5231
  };
5681
-
5682
5232
  __proto.connect = function (observer) {
5683
5233
  if (this._activeEvent) {
5684
5234
  this._detachElementEvent();
5685
-
5686
5235
  this._detachWindowEvent(this._activeEvent);
5687
5236
  }
5688
-
5689
5237
  this._attachElementEvent(observer);
5690
-
5691
5238
  this._originalCssProps = setCssProps(this.element, this.options, this._direction);
5692
5239
  return this;
5693
5240
  };
5694
-
5695
5241
  __proto.disconnect = function () {
5696
5242
  this._detachElementEvent();
5697
-
5698
5243
  this._detachWindowEvent(this._activeEvent);
5699
-
5700
5244
  if (!isCssPropsFromAxes(this._originalCssProps)) {
5701
5245
  revertCssProps(this.element, this._originalCssProps);
5702
5246
  }
5703
-
5704
5247
  this._direction = DIRECTION_NONE;
5705
5248
  return this;
5706
5249
  };
5707
- /**
5708
- * Destroys elements, properties, and events used in a module.
5709
- * @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
5250
+ /**
5251
+ * Destroys elements, properties, and events used in a module.
5252
+ * @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
5710
5253
  */
5711
-
5712
-
5713
5254
  __proto.destroy = function () {
5714
5255
  this.disconnect();
5715
5256
  this.element = null;
5716
5257
  };
5717
- /**
5718
- * Enables input devices
5719
- * @ko 입력 장치를 사용할 수 있게 한다
5720
- * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5258
+ /**
5259
+ * Enables input devices
5260
+ * @ko 입력 장치를 사용할 수 있게 한다
5261
+ * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5721
5262
  */
5722
-
5723
-
5724
5263
  __proto.enable = function () {
5725
5264
  this._enabled = true;
5726
5265
  return this;
5727
5266
  };
5728
- /**
5729
- * Disables input devices
5730
- * @ko 입력 장치를 사용할 수 없게 한다.
5731
- * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5267
+ /**
5268
+ * Disables input devices
5269
+ * @ko 입력 장치를 사용할 수 없게 한다.
5270
+ * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5732
5271
  */
5733
-
5734
-
5735
5272
  __proto.disable = function () {
5736
5273
  this._enabled = false;
5737
5274
  return this;
5738
5275
  };
5739
- /**
5740
- * Returns whether to use an input device
5741
- * @ko 입력 장치 사용 여부를 반환한다.
5742
- * @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
5276
+ /**
5277
+ * Returns whether to use an input device
5278
+ * @ko 입력 장치 사용 여부를 반환한다.
5279
+ * @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
5743
5280
  */
5744
-
5745
-
5746
5281
  __proto.isEnabled = function () {
5747
5282
  return this._enabled;
5748
5283
  };
5749
- /**
5750
- * Releases current user input.
5751
- * @ko 사용자의 입력을 강제로 중단시킨다.
5752
- * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5284
+ /**
5285
+ * Releases current user input.
5286
+ * @ko 사용자의 입력을 강제로 중단시킨다.
5287
+ * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5753
5288
  */
5754
-
5755
-
5756
5289
  __proto.release = function () {
5757
5290
  var activeEvent = this._activeEvent;
5758
5291
  var prevEvent = activeEvent.prevEvent;
5759
5292
  activeEvent.onRelease();
5760
-
5761
5293
  this._observer.release(this, prevEvent, [0, 0]);
5762
-
5763
5294
  this._detachWindowEvent(activeEvent);
5764
-
5765
5295
  return this;
5766
5296
  };
5767
-
5768
5297
  __proto._onPanstart = function (event) {
5769
5298
  var _a = this.options,
5770
- inputKey = _a.inputKey,
5771
- inputButton = _a.inputButton;
5299
+ inputKey = _a.inputKey,
5300
+ inputButton = _a.inputButton;
5772
5301
  var activeEvent = this._activeEvent;
5773
5302
  var panEvent = activeEvent.onEventStart(event, inputKey, inputButton);
5774
-
5775
5303
  if (!panEvent || !this._enabled || activeEvent.getTouches(event, inputButton) > 1) {
5776
5304
  return;
5777
5305
  }
5778
-
5779
5306
  if (panEvent.srcEvent.cancelable !== false) {
5780
5307
  var edgeThreshold = this.options.iOSEdgeSwipeThreshold;
5781
5308
  this._dragged = false;
5782
5309
  this._isOverThreshold = false;
5783
-
5784
5310
  this._observer.hold(this, panEvent);
5785
-
5786
5311
  this._atRightEdge = IS_IOS_SAFARI && panEvent.center.x > window.innerWidth - edgeThreshold;
5787
-
5788
5312
  this._attachWindowEvent(activeEvent);
5789
-
5790
5313
  activeEvent.prevEvent = panEvent;
5791
5314
  }
5792
5315
  };
5793
-
5794
5316
  __proto._onPanmove = function (event) {
5795
5317
  var _this = this;
5796
-
5797
5318
  var _a = this.options,
5798
- iOSEdgeSwipeThreshold = _a.iOSEdgeSwipeThreshold,
5799
- preventClickOnDrag = _a.preventClickOnDrag,
5800
- releaseOnScroll = _a.releaseOnScroll,
5801
- inputKey = _a.inputKey,
5802
- inputButton = _a.inputButton,
5803
- threshold = _a.threshold,
5804
- thresholdAngle = _a.thresholdAngle;
5319
+ iOSEdgeSwipeThreshold = _a.iOSEdgeSwipeThreshold,
5320
+ preventClickOnDrag = _a.preventClickOnDrag,
5321
+ releaseOnScroll = _a.releaseOnScroll,
5322
+ inputKey = _a.inputKey,
5323
+ inputButton = _a.inputButton,
5324
+ threshold = _a.threshold,
5325
+ thresholdAngle = _a.thresholdAngle;
5805
5326
  var activeEvent = this._activeEvent;
5806
5327
  var panEvent = activeEvent.onEventMove(event, inputKey, inputButton);
5807
5328
  var touches = activeEvent.getTouches(event, inputButton);
5808
-
5809
5329
  if (touches === 0 || releaseOnScroll && panEvent && !panEvent.srcEvent.cancelable) {
5810
5330
  this._onPanend(event);
5811
-
5812
5331
  return;
5813
5332
  }
5814
-
5815
5333
  if (!panEvent || !this._enabled || touches > 1) {
5816
5334
  return;
5817
5335
  }
5818
-
5819
5336
  var userDirection = getDirectionByAngle(panEvent.angle, thresholdAngle);
5820
5337
  var useHorizontal = useDirection(DIRECTION_HORIZONTAL, this._direction, userDirection);
5821
5338
  var useVertical = useDirection(DIRECTION_VERTICAL, this._direction, userDirection);
5822
-
5823
5339
  if (activeEvent.prevEvent && IS_IOS_SAFARI) {
5824
5340
  var swipeLeftToRight = panEvent.center.x < 0;
5825
-
5826
5341
  if (swipeLeftToRight) {
5827
5342
  // iOS swipe left => right
5828
5343
  this.release();
5829
5344
  return;
5830
5345
  } else if (this._atRightEdge) {
5831
- clearTimeout(this._rightEdgeTimer); // - is right to left
5832
-
5346
+ clearTimeout(this._rightEdgeTimer);
5347
+ // - is right to left
5833
5348
  var swipeRightToLeft = panEvent.deltaX < -iOSEdgeSwipeThreshold;
5834
-
5835
5349
  if (swipeRightToLeft) {
5836
5350
  this._atRightEdge = false;
5837
5351
  } else {
@@ -5842,57 +5356,41 @@ version: 4.10.8-beta.1
5842
5356
  }
5843
5357
  }
5844
5358
  }
5845
-
5846
5359
  var distance = this._getDistance([panEvent.deltaX, panEvent.deltaY], [useHorizontal, useVertical]);
5847
-
5848
5360
  var offset = this._getOffset([panEvent.offsetX, panEvent.offsetY], [useHorizontal, useVertical]);
5849
-
5850
5361
  var prevent = offset.some(function (v) {
5851
5362
  return v !== 0;
5852
5363
  });
5853
-
5854
5364
  if (prevent) {
5855
5365
  if (panEvent.srcEvent.cancelable !== false) {
5856
5366
  panEvent.srcEvent.preventDefault();
5857
5367
  }
5858
-
5859
5368
  panEvent.srcEvent.stopPropagation();
5860
5369
  }
5861
-
5862
5370
  panEvent.preventSystemEvent = prevent;
5863
-
5864
5371
  if (prevent && (this._isOverThreshold || distance >= threshold)) {
5865
5372
  this._dragged = preventClickOnDrag;
5866
5373
  this._isOverThreshold = true;
5867
-
5868
5374
  this._observer.change(this, panEvent, toAxis(this.axes, offset));
5869
5375
  }
5870
-
5871
5376
  activeEvent.prevEvent = panEvent;
5872
5377
  };
5873
-
5874
5378
  __proto._onPanend = function (event) {
5875
5379
  var inputButton = this.options.inputButton;
5876
5380
  var activeEvent = this._activeEvent;
5877
5381
  activeEvent.onEventEnd(event);
5878
-
5879
5382
  if (!this._enabled || activeEvent.getTouches(event, inputButton) !== 0) {
5880
5383
  return;
5881
5384
  }
5882
-
5883
5385
  this._detachWindowEvent(activeEvent);
5884
-
5885
5386
  clearTimeout(this._rightEdgeTimer);
5886
5387
  var prevEvent = activeEvent.prevEvent;
5887
5388
  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];
5888
5389
  activeEvent.onRelease();
5889
-
5890
5390
  this._observer.release(this, prevEvent, velocity);
5891
5391
  };
5892
-
5893
5392
  __proto._attachWindowEvent = function (activeEvent) {
5894
5393
  var _this = this;
5895
-
5896
5394
  activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) {
5897
5395
  window.addEventListener(event, _this._onPanmove, getAddEventOptions(event));
5898
5396
  });
@@ -5900,10 +5398,8 @@ version: 4.10.8-beta.1
5900
5398
  window.addEventListener(event, _this._onPanend, getAddEventOptions(event));
5901
5399
  });
5902
5400
  };
5903
-
5904
5401
  __proto._detachWindowEvent = function (activeEvent) {
5905
5402
  var _this = this;
5906
-
5907
5403
  activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) {
5908
5404
  window.removeEventListener(event, _this._onPanmove);
5909
5405
  });
@@ -5911,49 +5407,39 @@ version: 4.10.8-beta.1
5911
5407
  window.removeEventListener(event, _this._onPanend);
5912
5408
  });
5913
5409
  };
5914
-
5915
5410
  __proto._getOffset = function (properties, direction) {
5916
5411
  var scale = this.options.scale;
5917
5412
  return [direction[0] ? properties[0] * scale[0] : 0, direction[1] ? properties[1] * scale[1] : 0];
5918
5413
  };
5919
-
5920
5414
  __proto._getDistance = function (delta, direction) {
5921
5415
  return Math.sqrt(Number(direction[0]) * Math.pow(delta[0], 2) + Number(direction[1]) * Math.pow(delta[1], 2));
5922
5416
  };
5923
-
5924
5417
  __proto._attachElementEvent = function (observer) {
5925
5418
  var _this = this;
5926
-
5927
5419
  var activeEvent = convertInputType(this.options.inputType);
5928
5420
  var element = this.element;
5929
-
5930
5421
  if (!activeEvent) {
5931
5422
  return;
5932
5423
  }
5933
-
5934
5424
  if (!element) {
5935
5425
  throw new Error("Element to connect input does not exist.");
5936
5426
  }
5937
-
5938
5427
  this._observer = observer;
5939
5428
  this._enabled = true;
5940
5429
  this._activeEvent = activeEvent;
5941
5430
  element.addEventListener("click", this._preventClickWhenDragged, true);
5942
5431
  activeEvent.start.forEach(function (event) {
5943
5432
  element.addEventListener(event, _this._onPanstart);
5944
- }); // adding event listener to element prevents invalid behavior in iOS Safari
5945
-
5433
+ });
5434
+ // adding event listener to element prevents invalid behavior in iOS Safari
5946
5435
  activeEvent.move.forEach(function (event) {
5947
5436
  element.addEventListener(event, _this._voidFunction);
5948
5437
  });
5949
5438
  };
5950
-
5951
5439
  __proto._detachElementEvent = function () {
5952
5440
  var _this = this;
5953
-
5954
5441
  var activeEvent = this._activeEvent;
5955
5442
  var element = this.element;
5956
-
5957
5443
  if (element) {
5958
5444
  element.removeEventListener("click", this._preventClickWhenDragged, true);
5959
5445
  activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.start.forEach(function (event) {
@@ -5963,17 +5449,15 @@ version: 4.10.8-beta.1
5963
5449
  element.removeEventListener(event, _this._voidFunction);
5964
5450
  });
5965
5451
  }
5966
-
5967
5452
  this._enabled = false;
5968
5453
  this._observer = null;
5969
5454
  };
5970
-
5971
5455
  return PanInput;
5972
5456
  }();
5973
5457
 
5974
- /*
5975
- * Copyright (c) 2015 NAVER Corp.
5976
- * egjs projects are licensed under the MIT license
5458
+ /*
5459
+ * Copyright (c) 2015 NAVER Corp.
5460
+ * egjs projects are licensed under the MIT license
5977
5461
  */
5978
5462
 
5979
5463
  var Axes$1 = Axes;
@@ -13378,7 +12862,7 @@ version: 4.10.8-beta.1
13378
12862
  * Flicking.VERSION; // ex) 4.0.0
13379
12863
  * ```
13380
12864
  */
13381
- Flicking.VERSION = "4.10.8-beta.1";
12865
+ Flicking.VERSION = "4.10.8";
13382
12866
  return Flicking;
13383
12867
  }(Component);
13384
12868