@egjs/flicking 4.12.0-beta.1 → 4.12.0-beta.11

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.12.0-beta.1
7
+ version: 4.12.0-beta.11
8
8
  */
9
9
  (function (global, factory) {
10
10
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -794,6 +794,8 @@ version: 4.12.0-beta.1
794
794
  STRICT: "strict"
795
795
  };
796
796
  var CLASS = {
797
+ VIEWPORT: "flicking-viewport",
798
+ CAMERA: "flicking-camera",
797
799
  VERTICAL: "vertical",
798
800
  HIDDEN: "flicking-hidden",
799
801
  DEFAULT_VIRTUAL: "flicking-panel"
@@ -1158,6 +1160,26 @@ version: 4.12.0-beta.1
1158
1160
  obj.__proto__ = proto;
1159
1161
  return obj;
1160
1162
  };
1163
+ var camelize = function (str) {
1164
+ return str.replace(/[\s-_]([a-z])/g, function (all, letter) {
1165
+ return letter.toUpperCase();
1166
+ });
1167
+ };
1168
+ var getDataAttributes = function (element, attributePrefix) {
1169
+ var dataAttributes = {};
1170
+ var attributes = element.attributes;
1171
+ var length = attributes.length;
1172
+ for (var i = 0; i < length; ++i) {
1173
+ var attribute = attributes[i];
1174
+ var name_1 = attribute.name,
1175
+ value = attribute.value;
1176
+ if (name_1.indexOf(attributePrefix) === -1) {
1177
+ continue;
1178
+ }
1179
+ dataAttributes[camelize(name_1.replace(attributePrefix, ""))] = value;
1180
+ }
1181
+ return dataAttributes;
1182
+ };
1161
1183
 
1162
1184
  var Utils = {
1163
1185
  __proto__: null,
@@ -1189,7 +1211,9 @@ version: 4.12.0-beta.1
1189
1211
  circulateIndex: circulateIndex,
1190
1212
  range: range,
1191
1213
  getElementSize: getElementSize,
1192
- setPrototypeOf: setPrototypeOf
1214
+ setPrototypeOf: setPrototypeOf,
1215
+ camelize: camelize,
1216
+ getDataAttributes: getDataAttributes
1193
1217
  };
1194
1218
 
1195
1219
  /*
@@ -2671,7 +2695,7 @@ version: 4.12.0-beta.1
2671
2695
  license: MIT
2672
2696
  author: NAVER Corp.
2673
2697
  repository: https://github.com/naver/egjs-axes
2674
- version: 3.9.0
2698
+ version: 3.9.1-beta.0
2675
2699
  */
2676
2700
 
2677
2701
  /*! *****************************************************************************
@@ -2725,9 +2749,9 @@ version: 4.12.0-beta.1
2725
2749
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2726
2750
  }
2727
2751
 
2728
- /*
2729
- * Copyright (c) 2015 NAVER Corp.
2730
- * egjs projects are licensed under the MIT license
2752
+ /*
2753
+ * Copyright (c) 2015 NAVER Corp.
2754
+ * egjs projects are licensed under the MIT license
2731
2755
  */
2732
2756
  /* eslint-disable no-new-func, no-nested-ternary */
2733
2757
  var win;
@@ -2742,9 +2766,9 @@ version: 4.12.0-beta.1
2742
2766
  win = window;
2743
2767
  }
2744
2768
 
2745
- /*
2746
- * Copyright (c) 2015 NAVER Corp.
2747
- * egjs projects are licensed under the MIT license
2769
+ /*
2770
+ * Copyright (c) 2015 NAVER Corp.
2771
+ * egjs projects are licensed under the MIT license
2748
2772
  */
2749
2773
  var DIRECTION_NONE = 1;
2750
2774
  var DIRECTION_LEFT = 2;
@@ -2870,19 +2894,19 @@ version: 4.12.0-beta.1
2870
2894
  };
2871
2895
  caf = win.clearTimeout;
2872
2896
  }
2873
- /**
2874
- * A polyfill for the window.requestAnimationFrame() method.
2875
- * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
2876
- * @private
2897
+ /**
2898
+ * A polyfill for the window.requestAnimationFrame() method.
2899
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
2900
+ * @private
2877
2901
  */
2878
- var requestAnimationFrame = function (fp) {
2902
+ var requestAnimationFrame$1 = function (fp) {
2879
2903
  return raf(fp);
2880
2904
  };
2881
- /**
2882
- * A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
2883
- * @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
2884
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
2885
- * @private
2905
+ /**
2906
+ * A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
2907
+ * @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
2908
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
2909
+ * @private
2886
2910
  */
2887
2911
  var cancelAnimationFrame = function (key) {
2888
2912
  caf(key);
@@ -3009,6 +3033,9 @@ version: 4.12.0-beta.1
3009
3033
  });
3010
3034
  Object.keys(newCssProps_1).forEach(function (prop) {
3011
3035
  oldCssProps[prop] = element.style[prop];
3036
+ });
3037
+ // Old style props like user-select can be corrupted if you change the style directly in the logic above.
3038
+ Object.keys(newCssProps_1).forEach(function (prop) {
3012
3039
  element.style[prop] = newCssProps_1[prop];
3013
3040
  });
3014
3041
  }
@@ -3028,32 +3055,32 @@ version: 4.12.0-beta.1
3028
3055
  this._axes = _axes;
3029
3056
  this.holdingCount = 0;
3030
3057
  }
3031
- /**
3032
- * This event is fired when a user holds an element on the screen of the device.
3033
- * @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
3034
- * @event Axes#hold
3035
- * @type {object}
3036
- * @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
3037
- * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3038
- * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3039
- * @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>
3040
- *
3041
- * @example
3042
- * ```js
3043
- * const axes = new eg.Axes({
3044
- * "x": {
3045
- * range: [0, 100]
3046
- * },
3047
- * "zoom": {
3048
- * range: [50, 30]
3049
- * }
3050
- * }).on("hold", function(event) {
3051
- * // event.pos
3052
- * // event.input
3053
- * // event.inputEvent
3054
- * // isTrusted
3055
- * });
3056
- * ```
3058
+ /**
3059
+ * This event is fired when a user holds an element on the screen of the device.
3060
+ * @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
3061
+ * @event Axes#hold
3062
+ * @type {object}
3063
+ * @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
3064
+ * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3065
+ * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3066
+ * @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>
3067
+ *
3068
+ * @example
3069
+ * ```js
3070
+ * const axes = new eg.Axes({
3071
+ * "x": {
3072
+ * range: [0, 100]
3073
+ * },
3074
+ * "zoom": {
3075
+ * range: [50, 30]
3076
+ * }
3077
+ * }).on("hold", function(event) {
3078
+ * // event.pos
3079
+ * // event.input
3080
+ * // event.inputEvent
3081
+ * // isTrusted
3082
+ * });
3083
+ * ```
3057
3084
  */
3058
3085
  var __proto = EventManager.prototype;
3059
3086
  __proto.hold = function (pos, option) {
@@ -3065,78 +3092,78 @@ version: 4.12.0-beta.1
3065
3092
  isTrusted: true
3066
3093
  }));
3067
3094
  };
3068
- /**
3069
- * Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
3070
- * @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
3071
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3072
- * @example
3073
- * ```js
3074
- * const axes = new eg.Axes({
3075
- * "x": {
3076
- * range: [0, 100]
3077
- * },
3078
- * "zoom": {
3079
- * range: [50, 30]
3080
- * }
3081
- * }).on("change", function(event) {
3082
- * event.holding && event.set({x: 10});
3083
- * });
3084
- * ```
3095
+ /**
3096
+ * Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
3097
+ * @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
3098
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3099
+ * @example
3100
+ * ```js
3101
+ * const axes = new eg.Axes({
3102
+ * "x": {
3103
+ * range: [0, 100]
3104
+ * },
3105
+ * "zoom": {
3106
+ * range: [50, 30]
3107
+ * }
3108
+ * }).on("change", function(event) {
3109
+ * event.holding && event.set({x: 10});
3110
+ * });
3111
+ * ```
3085
3112
  */
3086
- /** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
3087
- * @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
3088
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3089
- * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
3090
- * @example
3091
- * ```js
3092
- * const axes = new eg.Axes({
3093
- * "x": {
3094
- * range: [0, 100]
3095
- * },
3096
- * "zoom": {
3097
- * range: [50, 30]
3098
- * }
3099
- * }).on("animationStart", function(event) {
3100
- * event.setTo({x: 10}, 2000);
3101
- * });
3102
- * ```
3113
+ /** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
3114
+ * @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
3115
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
3116
+ * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
3117
+ * @example
3118
+ * ```js
3119
+ * const axes = new eg.Axes({
3120
+ * "x": {
3121
+ * range: [0, 100]
3122
+ * },
3123
+ * "zoom": {
3124
+ * range: [50, 30]
3125
+ * }
3126
+ * }).on("animationStart", function(event) {
3127
+ * event.setTo({x: 10}, 2000);
3128
+ * });
3129
+ * ```
3103
3130
  */
3104
- /**
3105
- * This event is fired when a user release an element on the screen of the device.
3106
- * @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
3107
- * @event Axes#release
3108
- * @type {object}
3109
- * @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
3110
- * @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
3111
- * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3112
- * @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>
3113
- * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3114
- * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3115
- * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3116
- * @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>
3117
- *
3118
- * @example
3119
- * ```js
3120
- * const axes = new eg.Axes({
3121
- * "x": {
3122
- * range: [0, 100]
3123
- * },
3124
- * "zoom": {
3125
- * range: [50, 30]
3126
- * }
3127
- * }).on("release", function(event) {
3128
- * // event.depaPos
3129
- * // event.destPos
3130
- * // event.delta
3131
- * // event.input
3132
- * // event.inputEvent
3133
- * // event.setTo
3134
- * // event.isTrusted
3135
- *
3136
- * // if you want to change the animation coordinates to move after the 'release' event.
3137
- * event.setTo({x: 10}, 2000);
3138
- * });
3139
- * ```
3131
+ /**
3132
+ * This event is fired when a user release an element on the screen of the device.
3133
+ * @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
3134
+ * @event Axes#release
3135
+ * @type {object}
3136
+ * @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
3137
+ * @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
3138
+ * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3139
+ * @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>
3140
+ * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3141
+ * @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
3142
+ * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3143
+ * @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>
3144
+ *
3145
+ * @example
3146
+ * ```js
3147
+ * const axes = new eg.Axes({
3148
+ * "x": {
3149
+ * range: [0, 100]
3150
+ * },
3151
+ * "zoom": {
3152
+ * range: [50, 30]
3153
+ * }
3154
+ * }).on("release", function(event) {
3155
+ * // event.depaPos
3156
+ * // event.destPos
3157
+ * // event.delta
3158
+ * // event.input
3159
+ * // event.inputEvent
3160
+ * // event.setTo
3161
+ * // event.isTrusted
3162
+ *
3163
+ * // if you want to change the animation coordinates to move after the 'release' event.
3164
+ * event.setTo({x: 10}, 2000);
3165
+ * });
3166
+ * ```
3140
3167
  */
3141
3168
  __proto.triggerRelease = function (param) {
3142
3169
  var _a = this._getRoundPos(param.destPos, param.depaPos),
@@ -3149,43 +3176,43 @@ version: 4.12.0-beta.1
3149
3176
  bounceRatio: this._getBounceRatio(roundPos)
3150
3177
  })));
3151
3178
  };
3152
- /**
3153
- * This event is fired when coordinate changes.
3154
- * @ko 좌표가 변경됐을 때 발생하는 이벤트
3155
- * @event Axes#change
3156
- * @type {object}
3157
- * @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
3158
- * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3159
- * @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>
3160
- * @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
3161
- * @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>
3162
- * @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3163
- * @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
3164
- * @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>
3165
- *
3166
- * @example
3167
- * ```js
3168
- * const axes = new eg.Axes({
3169
- * "x": {
3170
- * range: [0, 100]
3171
- * },
3172
- * "zoom": {
3173
- * range: [50, 30]
3174
- * }
3175
- * }).on("change", function(event) {
3176
- * // event.pos
3177
- * // event.delta
3178
- * // event.input
3179
- * // event.inputEvent
3180
- * // event.holding
3181
- * // event.set
3182
- * // event.isTrusted
3183
- *
3184
- * // if you want to change the coordinates to move after the 'change' event.
3185
- * // it works when the holding value of the change event is true.
3186
- * event.holding && event.set({x: 10});
3187
- * });
3188
- * ```
3179
+ /**
3180
+ * This event is fired when coordinate changes.
3181
+ * @ko 좌표가 변경됐을 때 발생하는 이벤트
3182
+ * @event Axes#change
3183
+ * @type {object}
3184
+ * @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
3185
+ * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3186
+ * @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>
3187
+ * @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
3188
+ * @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>
3189
+ * @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
3190
+ * @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
3191
+ * @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>
3192
+ *
3193
+ * @example
3194
+ * ```js
3195
+ * const axes = new eg.Axes({
3196
+ * "x": {
3197
+ * range: [0, 100]
3198
+ * },
3199
+ * "zoom": {
3200
+ * range: [50, 30]
3201
+ * }
3202
+ * }).on("change", function(event) {
3203
+ * // event.pos
3204
+ * // event.delta
3205
+ * // event.input
3206
+ * // event.inputEvent
3207
+ * // event.holding
3208
+ * // event.set
3209
+ * // event.isTrusted
3210
+ *
3211
+ * // if you want to change the coordinates to move after the 'change' event.
3212
+ * // it works when the holding value of the change event is true.
3213
+ * event.holding && event.set({x: 10});
3214
+ * });
3215
+ * ```
3189
3216
  */
3190
3217
  __proto.triggerChange = function (pos, depaPos, option, holding) {
3191
3218
  var _this = this;
@@ -3222,42 +3249,42 @@ version: 4.12.0-beta.1
3222
3249
  }
3223
3250
  return !event.isCanceled();
3224
3251
  };
3225
- /**
3226
- * This event is fired when animation starts.
3227
- * @ko 에니메이션이 시작할 때 발생한다.
3228
- * @event Axes#animationStart
3229
- * @type {object}
3230
- * @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
3231
- * @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
3232
- * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3233
- * @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
3234
- * @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>
3235
- * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3236
- * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3237
- * @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>
3238
- *
3239
- * @example
3240
- * ```js
3241
- * const axes = new eg.Axes({
3242
- * "x": {
3243
- * range: [0, 100]
3244
- * },
3245
- * "zoom": {
3246
- * range: [50, 30]
3247
- * }
3248
- * }).on("release", function(event) {
3249
- * // event.depaPos
3250
- * // event.destPos
3251
- * // event.delta
3252
- * // event.input
3253
- * // event.inputEvent
3254
- * // event.setTo
3255
- * // event.isTrusted
3256
- *
3257
- * // if you want to change the animation coordinates to move after the 'animationStart' event.
3258
- * event.setTo({x: 10}, 2000);
3259
- * });
3260
- * ```
3252
+ /**
3253
+ * This event is fired when animation starts.
3254
+ * @ko 에니메이션이 시작할 때 발생한다.
3255
+ * @event Axes#animationStart
3256
+ * @type {object}
3257
+ * @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
3258
+ * @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
3259
+ * @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
3260
+ * @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
3261
+ * @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>
3262
+ * @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
3263
+ * @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
3264
+ * @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>
3265
+ *
3266
+ * @example
3267
+ * ```js
3268
+ * const axes = new eg.Axes({
3269
+ * "x": {
3270
+ * range: [0, 100]
3271
+ * },
3272
+ * "zoom": {
3273
+ * range: [50, 30]
3274
+ * }
3275
+ * }).on("release", function(event) {
3276
+ * // event.depaPos
3277
+ * // event.destPos
3278
+ * // event.delta
3279
+ * // event.input
3280
+ * // event.inputEvent
3281
+ * // event.setTo
3282
+ * // event.isTrusted
3283
+ *
3284
+ * // if you want to change the animation coordinates to move after the 'animationStart' event.
3285
+ * event.setTo({x: 10}, 2000);
3286
+ * });
3287
+ * ```
3261
3288
  */
3262
3289
  __proto.triggerAnimationStart = function (param) {
3263
3290
  var _a = this._getRoundPos(param.destPos, param.depaPos),
@@ -3270,26 +3297,26 @@ version: 4.12.0-beta.1
3270
3297
  this._axes.trigger(event);
3271
3298
  return !event.isCanceled();
3272
3299
  };
3273
- /**
3274
- * This event is fired when animation ends.
3275
- * @ko 에니메이션이 끝났을 때 발생한다.
3276
- * @event Axes#animationEnd
3277
- * @type {object}
3278
- * @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>
3279
- *
3280
- * @example
3281
- * ```js
3282
- * const axes = new eg.Axes({
3283
- * "x": {
3284
- * range: [0, 100]
3285
- * },
3286
- * "zoom": {
3287
- * range: [50, 30]
3288
- * }
3289
- * }).on("animationEnd", function(event) {
3290
- * // event.isTrusted
3291
- * });
3292
- * ```
3300
+ /**
3301
+ * This event is fired when animation ends.
3302
+ * @ko 에니메이션이 끝났을 때 발생한다.
3303
+ * @event Axes#animationEnd
3304
+ * @type {object}
3305
+ * @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>
3306
+ *
3307
+ * @example
3308
+ * ```js
3309
+ * const axes = new eg.Axes({
3310
+ * "x": {
3311
+ * range: [0, 100]
3312
+ * },
3313
+ * "zoom": {
3314
+ * range: [50, 30]
3315
+ * }
3316
+ * }).on("animationEnd", function(event) {
3317
+ * // event.isTrusted
3318
+ * });
3319
+ * ```
3293
3320
  */
3294
3321
  __proto.triggerAnimationEnd = function (isTrusted) {
3295
3322
  if (isTrusted === void 0) {
@@ -3299,26 +3326,26 @@ version: 4.12.0-beta.1
3299
3326
  isTrusted: isTrusted
3300
3327
  }));
3301
3328
  };
3302
- /**
3303
- * This event is fired when all actions have been completed.
3304
- * @ko 에니메이션이 끝났을 때 발생한다.
3305
- * @event Axes#finish
3306
- * @type {object}
3307
- * @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>
3308
- *
3309
- * @example
3310
- * ```js
3311
- * const axes = new eg.Axes({
3312
- * "x": {
3313
- * range: [0, 100]
3314
- * },
3315
- * "zoom": {
3316
- * range: [50, 30]
3317
- * }
3318
- * }).on("finish", function(event) {
3319
- * // event.isTrusted
3320
- * });
3321
- * ```
3329
+ /**
3330
+ * This event is fired when all actions have been completed.
3331
+ * @ko 에니메이션이 끝났을 때 발생한다.
3332
+ * @event Axes#finish
3333
+ * @type {object}
3334
+ * @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>
3335
+ *
3336
+ * @example
3337
+ * ```js
3338
+ * const axes = new eg.Axes({
3339
+ * "x": {
3340
+ * range: [0, 100]
3341
+ * },
3342
+ * "zoom": {
3343
+ * range: [50, 30]
3344
+ * }
3345
+ * }).on("finish", function(event) {
3346
+ * // event.isTrusted
3347
+ * });
3348
+ * ```
3322
3349
  */
3323
3350
  __proto.triggerFinish = function (isTrusted) {
3324
3351
  if (isTrusted === void 0) {
@@ -3400,9 +3427,9 @@ version: 4.12.0-beta.1
3400
3427
  return InterruptManager;
3401
3428
  }();
3402
3429
 
3403
- /*
3404
- * Copyright (c) 2015 NAVER Corp.
3405
- * egjs projects are licensed under the MIT license
3430
+ /*
3431
+ * Copyright (c) 2015 NAVER Corp.
3432
+ * egjs projects are licensed under the MIT license
3406
3433
  */
3407
3434
  var getInsidePosition = function (destPos, range, circular, bounce) {
3408
3435
  var toDestPos = destPos;
@@ -3531,9 +3558,9 @@ version: 4.12.0-beta.1
3531
3558
  });
3532
3559
  this._complementOptions();
3533
3560
  };
3534
- /**
3535
- * set up 'css' expression
3536
- * @private
3561
+ /**
3562
+ * set up 'css' expression
3563
+ * @private
3537
3564
  */
3538
3565
  __proto._complementOptions = function () {
3539
3566
  var _this = this;
@@ -4420,7 +4447,7 @@ version: 4.12.0-beta.1
4420
4447
  } else if (isCanceled) {
4421
4448
  _this.finish(false);
4422
4449
  } else {
4423
- _this._raf = requestAnimationFrame(loop_1);
4450
+ _this._raf = requestAnimationFrame$1(loop_1);
4424
4451
  }
4425
4452
  };
4426
4453
  loop_1();
@@ -4429,15 +4456,15 @@ version: 4.12.0-beta.1
4429
4456
  complete();
4430
4457
  }
4431
4458
  };
4432
- /**
4433
- * Get estimated final value.
4434
- *
4435
- * If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
4436
- * - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
4437
- * 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.
4438
- * - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
4439
- * @param originalIntendedPos
4440
- * @param destPos
4459
+ /**
4460
+ * Get estimated final value.
4461
+ *
4462
+ * If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
4463
+ * - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
4464
+ * 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.
4465
+ * - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
4466
+ * @param originalIntendedPos
4467
+ * @param destPos
4441
4468
  */
4442
4469
  __proto._getFinalPos = function (destPos, originalIntendedPos) {
4443
4470
  var _this = this;
@@ -4563,111 +4590,111 @@ version: 4.12.0-beta.1
4563
4590
  return EasingManager;
4564
4591
  }(AnimationManager);
4565
4592
 
4566
- /**
4567
- * @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
4568
- * @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
4569
- * @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
4570
- * @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
4571
- * @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
4572
- * @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
4573
- * @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>
4574
- * @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
4575
- * @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
4576
- * @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>
4577
- * @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
4578
- * @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
4593
+ /**
4594
+ * @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
4595
+ * @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
4596
+ * @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
4597
+ * @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
4598
+ * @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
4599
+ * @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
4600
+ * @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>
4601
+ * @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
4602
+ * @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
4603
+ * @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>
4604
+ * @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
4605
+ * @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
4579
4606
  **/
4580
- /**
4581
- * @typedef {Object} AxesOption The option object of the eg.Axes module
4582
- * @ko eg.Axes 모듈의 옵션 객체
4583
- * @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
4584
- * @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
4585
- * @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
4586
- * @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>
4587
- * @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
4588
- * - true: It can be paused or stopped by user action or the API.
4589
- * - false: It cannot be paused or stopped by user action or the API while it is running.
4590
- * <ko>진행 중인 애니메이션 중지 가능 여부.
4591
- * - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
4592
- * - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
4593
- * @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)
4594
- * [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
4595
- * [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
4596
- * @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
4607
+ /**
4608
+ * @typedef {Object} AxesOption The option object of the eg.Axes module
4609
+ * @ko eg.Axes 모듈의 옵션 객체
4610
+ * @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
4611
+ * @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
4612
+ * @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
4613
+ * @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>
4614
+ * @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
4615
+ * - true: It can be paused or stopped by user action or the API.
4616
+ * - false: It cannot be paused or stopped by user action or the API while it is running.
4617
+ * <ko>진행 중인 애니메이션 중지 가능 여부.
4618
+ * - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
4619
+ * - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
4620
+ * @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)
4621
+ * [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
4622
+ * [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
4623
+ * @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
4597
4624
  **/
4598
- /**
4599
- * 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.
4600
- * @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
4601
- * @extends eg.Component
4602
- *
4603
- * @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>
4604
- * @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
4605
- * @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>
4606
- *
4607
- * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
4608
- * @example
4609
- * ```js
4610
- * // 1. Initialize eg.Axes
4611
- * const axes = new eg.Axes({
4612
- * something1: {
4613
- * range: [0, 150],
4614
- * bounce: 50
4615
- * },
4616
- * something2: {
4617
- * range: [0, 200],
4618
- * bounce: 100
4619
- * },
4620
- * somethingN: {
4621
- * range: [1, 10],
4622
- * }
4623
- * }, {
4624
- * deceleration : 0.0024
4625
- * });
4626
- *
4627
- * // 2. attach event handler
4628
- * axes.on({
4629
- * "hold" : function(evt) {
4630
- * },
4631
- * "release" : function(evt) {
4632
- * },
4633
- * "animationStart" : function(evt) {
4634
- * },
4635
- * "animationEnd" : function(evt) {
4636
- * },
4637
- * "change" : function(evt) {
4638
- * }
4639
- * });
4640
- *
4641
- * // 3. Initialize inputTypes
4642
- * const panInputArea = new eg.Axes.PanInput("#area", {
4643
- * scale: [0.5, 1]
4644
- * });
4645
- * const panInputHmove = new eg.Axes.PanInput("#hmove");
4646
- * const panInputVmove = new eg.Axes.PanInput("#vmove");
4647
- * const pinchInputArea = new eg.Axes.PinchInput("#area", {
4648
- * scale: 1.5
4649
- * });
4650
- *
4651
- * // 4. Connect eg.Axes and InputTypes
4652
- * // [PanInput] When the mouse or touchscreen is down and moved.
4653
- * // Connect the 'something2' axis to the mouse or touchscreen x position and
4654
- * // connect the 'somethingN' axis to the mouse or touchscreen y position.
4655
- * axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
4656
- *
4657
- * // Connect only one 'something1' axis to the mouse or touchscreen x position.
4658
- * axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
4659
- *
4660
- * // Connect only one 'something2' axis to the mouse or touchscreen y position.
4661
- * axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
4662
- *
4663
- * // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
4664
- * axes.connect("something2", pinchInputArea);
4665
- * ```
4625
+ /**
4626
+ * 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.
4627
+ * @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
4628
+ * @extends eg.Component
4629
+ *
4630
+ * @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>
4631
+ * @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
4632
+ * @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>
4633
+ *
4634
+ * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
4635
+ * @example
4636
+ * ```js
4637
+ * // 1. Initialize eg.Axes
4638
+ * const axes = new eg.Axes({
4639
+ * something1: {
4640
+ * range: [0, 150],
4641
+ * bounce: 50
4642
+ * },
4643
+ * something2: {
4644
+ * range: [0, 200],
4645
+ * bounce: 100
4646
+ * },
4647
+ * somethingN: {
4648
+ * range: [1, 10],
4649
+ * }
4650
+ * }, {
4651
+ * deceleration : 0.0024
4652
+ * });
4653
+ *
4654
+ * // 2. attach event handler
4655
+ * axes.on({
4656
+ * "hold" : function(evt) {
4657
+ * },
4658
+ * "release" : function(evt) {
4659
+ * },
4660
+ * "animationStart" : function(evt) {
4661
+ * },
4662
+ * "animationEnd" : function(evt) {
4663
+ * },
4664
+ * "change" : function(evt) {
4665
+ * }
4666
+ * });
4667
+ *
4668
+ * // 3. Initialize inputTypes
4669
+ * const panInputArea = new eg.Axes.PanInput("#area", {
4670
+ * scale: [0.5, 1]
4671
+ * });
4672
+ * const panInputHmove = new eg.Axes.PanInput("#hmove");
4673
+ * const panInputVmove = new eg.Axes.PanInput("#vmove");
4674
+ * const pinchInputArea = new eg.Axes.PinchInput("#area", {
4675
+ * scale: 1.5
4676
+ * });
4677
+ *
4678
+ * // 4. Connect eg.Axes and InputTypes
4679
+ * // [PanInput] When the mouse or touchscreen is down and moved.
4680
+ * // Connect the 'something2' axis to the mouse or touchscreen x position and
4681
+ * // connect the 'somethingN' axis to the mouse or touchscreen y position.
4682
+ * axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
4683
+ *
4684
+ * // Connect only one 'something1' axis to the mouse or touchscreen x position.
4685
+ * axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
4686
+ *
4687
+ * // Connect only one 'something2' axis to the mouse or touchscreen y position.
4688
+ * axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
4689
+ *
4690
+ * // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
4691
+ * axes.connect("something2", pinchInputArea);
4692
+ * ```
4666
4693
  */
4667
4694
  var Axes = /*#__PURE__*/function (_super) {
4668
4695
  __extends$1(Axes, _super);
4669
- /**
4670
- *
4696
+ /**
4697
+ *
4671
4698
  */
4672
4699
  function Axes(axis, options, startPos) {
4673
4700
  if (axis === void 0) {
@@ -4707,23 +4734,23 @@ version: 4.12.0-beta.1
4707
4734
  }
4708
4735
  var __proto = Axes.prototype;
4709
4736
  Object.defineProperty(__proto, "holding", {
4710
- /**
4711
- * @name Axes#holding
4712
- * @desc Returns true if at least one input is in progress.
4713
- * @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
4714
- *
4715
- * @readonly
4716
- * @type {boolean}
4717
- * @example
4718
- * ```js
4719
- * const axes = new eg.Axes({
4720
- * x: {
4721
- * range: [0, 100],
4722
- * },
4723
- * });
4724
- *
4725
- * axes.holding
4726
- * ```
4737
+ /**
4738
+ * @name Axes#holding
4739
+ * @desc Returns true if at least one input is in progress.
4740
+ * @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
4741
+ *
4742
+ * @readonly
4743
+ * @type {boolean}
4744
+ * @example
4745
+ * ```js
4746
+ * const axes = new eg.Axes({
4747
+ * x: {
4748
+ * range: [0, 100],
4749
+ * },
4750
+ * });
4751
+ *
4752
+ * axes.holding
4753
+ * ```
4727
4754
  */
4728
4755
  get: function () {
4729
4756
  return this.eventManager.holdingCount > 0;
@@ -4731,30 +4758,30 @@ version: 4.12.0-beta.1
4731
4758
  enumerable: false,
4732
4759
  configurable: true
4733
4760
  });
4734
- /**
4735
- * Connect the axis of eg.Axes to the inputType.
4736
- * @ko eg.Axes의 축과 inputType을 연결한다
4737
- * @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
4738
- * @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
4739
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4740
- * @example
4741
- * ```js
4742
- * const axes = new eg.Axes({
4743
- * "x": {
4744
- * range: [0, 100]
4745
- * },
4746
- * "xOther": {
4747
- * range: [-100, 100]
4748
- * }
4749
- * });
4750
- *
4751
- * axes.connect("x", new eg.Axes.PanInput("#area1"))
4752
- * .connect("x xOther", new eg.Axes.PanInput("#area2"))
4753
- * .connect(" xOther", new eg.Axes.PanInput("#area3"))
4754
- * .connect(["x"], new eg.Axes.PanInput("#area4"))
4755
- * .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
4756
- * .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
4757
- * ```
4761
+ /**
4762
+ * Connect the axis of eg.Axes to the inputType.
4763
+ * @ko eg.Axes의 축과 inputType을 연결한다
4764
+ * @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
4765
+ * @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
4766
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4767
+ * @example
4768
+ * ```js
4769
+ * const axes = new eg.Axes({
4770
+ * "x": {
4771
+ * range: [0, 100]
4772
+ * },
4773
+ * "xOther": {
4774
+ * range: [-100, 100]
4775
+ * }
4776
+ * });
4777
+ *
4778
+ * axes.connect("x", new eg.Axes.PanInput("#area1"))
4779
+ * .connect("x xOther", new eg.Axes.PanInput("#area2"))
4780
+ * .connect(" xOther", new eg.Axes.PanInput("#area3"))
4781
+ * .connect(["x"], new eg.Axes.PanInput("#area4"))
4782
+ * .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
4783
+ * .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
4784
+ * ```
4758
4785
  */
4759
4786
  __proto.connect = function (axes, inputType) {
4760
4787
  var mapped;
@@ -4772,33 +4799,33 @@ version: 4.12.0-beta.1
4772
4799
  this._inputs.push(inputType);
4773
4800
  return this;
4774
4801
  };
4775
- /**
4776
- * Disconnect the axis of eg.Axes from the inputType.
4777
- * @ko eg.Axes의 축과 inputType의 연결을 끊는다.
4778
- * @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
4779
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4780
- * @example
4781
- * ```js
4782
- * const axes = new eg.Axes({
4783
- * "x": {
4784
- * range: [0, 100]
4785
- * },
4786
- * "xOther": {
4787
- * range: [-100, 100]
4788
- * }
4789
- * });
4790
- *
4791
- * const input1 = new eg.Axes.PanInput("#area1");
4792
- * const input2 = new eg.Axes.PanInput("#area2");
4793
- * const input3 = new eg.Axes.PanInput("#area3");
4794
- *
4795
- * axes.connect("x", input1);
4796
- * .connect("x xOther", input2)
4797
- * .connect(["xOther", "x"], input3);
4798
- *
4799
- * axes.disconnect(input1); // disconnects input1
4800
- * axes.disconnect(); // disconnects all of them
4801
- * ```
4802
+ /**
4803
+ * Disconnect the axis of eg.Axes from the inputType.
4804
+ * @ko eg.Axes의 축과 inputType의 연결을 끊는다.
4805
+ * @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
4806
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4807
+ * @example
4808
+ * ```js
4809
+ * const axes = new eg.Axes({
4810
+ * "x": {
4811
+ * range: [0, 100]
4812
+ * },
4813
+ * "xOther": {
4814
+ * range: [-100, 100]
4815
+ * }
4816
+ * });
4817
+ *
4818
+ * const input1 = new eg.Axes.PanInput("#area1");
4819
+ * const input2 = new eg.Axes.PanInput("#area2");
4820
+ * const input3 = new eg.Axes.PanInput("#area3");
4821
+ *
4822
+ * axes.connect("x", input1);
4823
+ * .connect("x xOther", input2)
4824
+ * .connect(["xOther", "x"], input3);
4825
+ *
4826
+ * axes.disconnect(input1); // disconnects input1
4827
+ * axes.disconnect(); // disconnects all of them
4828
+ * ```
4802
4829
  */
4803
4830
  __proto.disconnect = function (inputType) {
4804
4831
  if (inputType) {
@@ -4815,60 +4842,60 @@ version: 4.12.0-beta.1
4815
4842
  }
4816
4843
  return this;
4817
4844
  };
4818
- /**
4819
- * Returns the current position of the coordinates.
4820
- * @ko 좌표의 현재 위치를 반환한다
4821
- * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
4822
- * @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
4823
- * @example
4824
- * ```js
4825
- * const axes = new eg.Axes({
4826
- * "x": {
4827
- * range: [0, 100]
4828
- * },
4829
- * "xOther": {
4830
- * range: [-100, 100]
4831
- * },
4832
- * "zoom": {
4833
- * range: [50, 30]
4834
- * }
4835
- * });
4836
- *
4837
- * axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
4838
- * axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
4839
- * ```
4845
+ /**
4846
+ * Returns the current position of the coordinates.
4847
+ * @ko 좌표의 현재 위치를 반환한다
4848
+ * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
4849
+ * @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
4850
+ * @example
4851
+ * ```js
4852
+ * const axes = new eg.Axes({
4853
+ * "x": {
4854
+ * range: [0, 100]
4855
+ * },
4856
+ * "xOther": {
4857
+ * range: [-100, 100]
4858
+ * },
4859
+ * "zoom": {
4860
+ * range: [50, 30]
4861
+ * }
4862
+ * });
4863
+ *
4864
+ * axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
4865
+ * axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
4866
+ * ```
4840
4867
  */
4841
4868
  __proto.get = function (axes) {
4842
4869
  return this.axisManager.get(axes);
4843
4870
  };
4844
- /**
4845
- * Moves an axis to specific coordinates.
4846
- * @ko 좌표를 이동한다.
4847
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
4848
- * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
4849
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4850
- * @example
4851
- * ```js
4852
- * const axes = new eg.Axes({
4853
- * "x": {
4854
- * range: [0, 100]
4855
- * },
4856
- * "xOther": {
4857
- * range: [-100, 100]
4858
- * },
4859
- * "zoom": {
4860
- * range: [50, 30]
4861
- * }
4862
- * });
4863
- *
4864
- * axes.setTo({"x": 30, "zoom": 60});
4865
- * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
4866
- *
4867
- * axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
4868
- *
4869
- * // after 1000 ms
4870
- * axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
4871
- * ```
4871
+ /**
4872
+ * Moves an axis to specific coordinates.
4873
+ * @ko 좌표를 이동한다.
4874
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
4875
+ * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
4876
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4877
+ * @example
4878
+ * ```js
4879
+ * const axes = new eg.Axes({
4880
+ * "x": {
4881
+ * range: [0, 100]
4882
+ * },
4883
+ * "xOther": {
4884
+ * range: [-100, 100]
4885
+ * },
4886
+ * "zoom": {
4887
+ * range: [50, 30]
4888
+ * }
4889
+ * });
4890
+ *
4891
+ * axes.setTo({"x": 30, "zoom": 60});
4892
+ * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
4893
+ *
4894
+ * axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
4895
+ *
4896
+ * // after 1000 ms
4897
+ * axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
4898
+ * ```
4872
4899
  */
4873
4900
  __proto.setTo = function (pos, duration) {
4874
4901
  if (duration === void 0) {
@@ -4877,34 +4904,34 @@ version: 4.12.0-beta.1
4877
4904
  this.animationManager.setTo(pos, duration);
4878
4905
  return this;
4879
4906
  };
4880
- /**
4881
- * Moves an axis from the current coordinates to specific coordinates.
4882
- * @ko 현재 좌표를 기준으로 좌표를 이동한다.
4883
- * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
4884
- * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
4885
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4886
- * @example
4887
- * ```js
4888
- * const axes = new eg.Axes({
4889
- * "x": {
4890
- * range: [0, 100]
4891
- * },
4892
- * "xOther": {
4893
- * range: [-100, 100]
4894
- * },
4895
- * "zoom": {
4896
- * range: [50, 30]
4897
- * }
4898
- * });
4899
- *
4900
- * axes.setBy({"x": 30, "zoom": 10});
4901
- * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
4902
- *
4903
- * axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
4904
- *
4905
- * // after 1000 ms
4906
- * axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
4907
- * ```
4907
+ /**
4908
+ * Moves an axis from the current coordinates to specific coordinates.
4909
+ * @ko 현재 좌표를 기준으로 좌표를 이동한다.
4910
+ * @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
4911
+ * @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
4912
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4913
+ * @example
4914
+ * ```js
4915
+ * const axes = new eg.Axes({
4916
+ * "x": {
4917
+ * range: [0, 100]
4918
+ * },
4919
+ * "xOther": {
4920
+ * range: [-100, 100]
4921
+ * },
4922
+ * "zoom": {
4923
+ * range: [50, 30]
4924
+ * }
4925
+ * });
4926
+ *
4927
+ * axes.setBy({"x": 30, "zoom": 10});
4928
+ * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
4929
+ *
4930
+ * axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
4931
+ *
4932
+ * // after 1000 ms
4933
+ * axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
4934
+ * ```
4908
4935
  */
4909
4936
  __proto.setBy = function (pos, duration) {
4910
4937
  if (duration === void 0) {
@@ -4913,230 +4940,230 @@ version: 4.12.0-beta.1
4913
4940
  this.animationManager.setBy(pos, duration);
4914
4941
  return this;
4915
4942
  };
4916
- /**
4917
- * Change the options of Axes instance.
4918
- * @ko 인스턴스의 옵션을 변경한다.
4919
- * @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
4920
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4921
- * @example
4922
- * ```js
4923
- * const axes = new eg.Axes({
4924
- * "x": {
4925
- * range: [0, 100]
4926
- * },
4927
- * }, {
4928
- * round: 10,
4929
- * });
4930
- *
4931
- * axes.setTo({"x": 48});
4932
- * axes.get(); // {"x": 50}
4933
- *
4934
- * axes.setOptions({
4935
- * round: 1,
4936
- * });
4937
- *
4938
- * axes.setTo({"x": 48});
4939
- * axes.get(); // {"x": 48}
4940
- * ```
4943
+ /**
4944
+ * Change the options of Axes instance.
4945
+ * @ko 인스턴스의 옵션을 변경한다.
4946
+ * @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
4947
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4948
+ * @example
4949
+ * ```js
4950
+ * const axes = new eg.Axes({
4951
+ * "x": {
4952
+ * range: [0, 100]
4953
+ * },
4954
+ * }, {
4955
+ * round: 10,
4956
+ * });
4957
+ *
4958
+ * axes.setTo({"x": 48});
4959
+ * axes.get(); // {"x": 50}
4960
+ *
4961
+ * axes.setOptions({
4962
+ * round: 1,
4963
+ * });
4964
+ *
4965
+ * axes.setTo({"x": 48});
4966
+ * axes.get(); // {"x": 48}
4967
+ * ```
4941
4968
  */
4942
4969
  __proto.setOptions = function (options) {
4943
4970
  this.options = __assign$1(__assign$1({}, this.options), options);
4944
4971
  this.animationManager.setOptions(options);
4945
4972
  return this;
4946
4973
  };
4947
- /**
4948
- * Change the information of an existing axis.
4949
- * @ko 존재하는 축의 정보를 변경한다.
4950
- * @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
4951
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4952
- * @example
4953
- * ```js
4954
- * const axes = new eg.Axes({
4955
- * "x": {
4956
- * range: [0, 100]
4957
- * },
4958
- * });
4959
- *
4960
- * axes.setTo({"x": 150});
4961
- * axes.get(); // {"x": 100}
4962
- *
4963
- * axes.setAxis({
4964
- * "x": {
4965
- * range: [0, 200]
4966
- * },
4967
- * });
4968
- *
4969
- * axes.setTo({"x": 150});
4970
- * axes.get(); // {"x": 150}
4971
- * ```
4974
+ /**
4975
+ * Change the information of an existing axis.
4976
+ * @ko 존재하는 축의 정보를 변경한다.
4977
+ * @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
4978
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4979
+ * @example
4980
+ * ```js
4981
+ * const axes = new eg.Axes({
4982
+ * "x": {
4983
+ * range: [0, 100]
4984
+ * },
4985
+ * });
4986
+ *
4987
+ * axes.setTo({"x": 150});
4988
+ * axes.get(); // {"x": 100}
4989
+ *
4990
+ * axes.setAxis({
4991
+ * "x": {
4992
+ * range: [0, 200]
4993
+ * },
4994
+ * });
4995
+ *
4996
+ * axes.setTo({"x": 150});
4997
+ * axes.get(); // {"x": 150}
4998
+ * ```
4972
4999
  */
4973
5000
  __proto.setAxis = function (axis) {
4974
5001
  this.axisManager.setAxis(axis);
4975
5002
  return this;
4976
5003
  };
4977
- /**
4978
- * Stop an animation in progress.
4979
- * @ko 재생 중인 애니메이션을 정지한다.
4980
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
4981
- * @example
4982
- * ```js
4983
- * const axes = new eg.Axes({
4984
- * "x": {
4985
- * range: [0, 100]
4986
- * },
4987
- * });
4988
- *
4989
- * axes.setTo({"x": 10}, 1000); // start animatation
4990
- *
4991
- * // after 500 ms
4992
- * axes.stopAnimation(); // stop animation during movement.
4993
- * ```
5004
+ /**
5005
+ * Stop an animation in progress.
5006
+ * @ko 재생 중인 애니메이션을 정지한다.
5007
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5008
+ * @example
5009
+ * ```js
5010
+ * const axes = new eg.Axes({
5011
+ * "x": {
5012
+ * range: [0, 100]
5013
+ * },
5014
+ * });
5015
+ *
5016
+ * axes.setTo({"x": 10}, 1000); // start animatation
5017
+ *
5018
+ * // after 500 ms
5019
+ * axes.stopAnimation(); // stop animation during movement.
5020
+ * ```
4994
5021
  */
4995
5022
  __proto.stopAnimation = function () {
4996
5023
  this.animationManager.stopAnimation();
4997
5024
  this.animationManager.finish(false);
4998
5025
  return this;
4999
5026
  };
5000
- /**
5001
- * Change the destination of an animation in progress.
5002
- * @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
5003
- * @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
5004
- * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5005
- * @example
5006
- * ```js
5007
- * const axes = new eg.Axes({
5008
- * "x": {
5009
- * range: [0, 200]
5010
- * },
5011
- * "y": {
5012
- * range: [0, 200]
5013
- * }
5014
- * });
5015
- *
5016
- * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
5017
- *
5018
- * // after 500 ms
5019
- * axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
5020
- *
5021
- * // after 500 ms
5022
- * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
5023
- *
5024
- * // after 700 ms
5025
- * 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.
5026
- * ```
5027
+ /**
5028
+ * Change the destination of an animation in progress.
5029
+ * @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
5030
+ * @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
5031
+ * @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5032
+ * @example
5033
+ * ```js
5034
+ * const axes = new eg.Axes({
5035
+ * "x": {
5036
+ * range: [0, 200]
5037
+ * },
5038
+ * "y": {
5039
+ * range: [0, 200]
5040
+ * }
5041
+ * });
5042
+ *
5043
+ * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
5044
+ *
5045
+ * // after 500 ms
5046
+ * axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
5047
+ *
5048
+ * // after 500 ms
5049
+ * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
5050
+ *
5051
+ * // after 700 ms
5052
+ * 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.
5053
+ * ```
5027
5054
  */
5028
5055
  __proto.updateAnimation = function (options) {
5029
5056
  this.animationManager.updateAnimation(options);
5030
5057
  return this;
5031
5058
  };
5032
- /**
5033
- * Returns whether there is a coordinate in the bounce area of ​​the target axis.
5034
- * @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
5035
- * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
5036
- * @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
5037
- * @example
5038
- * ```js
5039
- * const axes = new eg.Axes({
5040
- * "x": {
5041
- * range: [0, 100]
5042
- * },
5043
- * "xOther": {
5044
- * range: [-100, 100]
5045
- * },
5046
- * "zoom": {
5047
- * range: [50, 30]
5048
- * }
5049
- * });
5050
- *
5051
- * axes.isBounceArea(["x"]);
5052
- * axes.isBounceArea(["x", "zoom"]);
5053
- * axes.isBounceArea();
5054
- * ```
5059
+ /**
5060
+ * Returns whether there is a coordinate in the bounce area of ​​the target axis.
5061
+ * @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
5062
+ * @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
5063
+ * @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
5064
+ * @example
5065
+ * ```js
5066
+ * const axes = new eg.Axes({
5067
+ * "x": {
5068
+ * range: [0, 100]
5069
+ * },
5070
+ * "xOther": {
5071
+ * range: [-100, 100]
5072
+ * },
5073
+ * "zoom": {
5074
+ * range: [50, 30]
5075
+ * }
5076
+ * });
5077
+ *
5078
+ * axes.isBounceArea(["x"]);
5079
+ * axes.isBounceArea(["x", "zoom"]);
5080
+ * axes.isBounceArea();
5081
+ * ```
5055
5082
  */
5056
5083
  __proto.isBounceArea = function (axes) {
5057
5084
  return this.axisManager.isOutside(axes);
5058
5085
  };
5059
- /**
5060
- * Destroys properties, and events used in a module and disconnect all connections to inputTypes.
5061
- * @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
5086
+ /**
5087
+ * Destroys properties, and events used in a module and disconnect all connections to inputTypes.
5088
+ * @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
5062
5089
  */
5063
5090
  __proto.destroy = function () {
5064
5091
  this.disconnect();
5065
5092
  this.eventManager.destroy();
5066
5093
  };
5067
- /**
5068
- * @name VERSION
5069
- * @desc Version info string
5070
- * @ko 버전정보 문자열
5071
- *
5072
- * @constant
5073
- * @type {String}
5074
- * @example
5075
- * ```js
5076
- * eg.Axes.VERSION; // ex) 3.3.3
5077
- * ```
5094
+ /**
5095
+ * @name VERSION
5096
+ * @desc Version info string
5097
+ * @ko 버전정보 문자열
5098
+ *
5099
+ * @constant
5100
+ * @type {String}
5101
+ * @example
5102
+ * ```js
5103
+ * eg.Axes.VERSION; // ex) 3.3.3
5104
+ * ```
5078
5105
  */
5079
- Axes.VERSION = "3.9.0";
5106
+ Axes.VERSION = "3.9.1-beta.0";
5080
5107
  /* eslint-enable */
5081
- /**
5082
- * @name TRANSFORM
5083
- * @desc Returns the transform attribute with CSS vendor prefixes.
5084
- * @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
5085
- *
5086
- * @constant
5087
- * @type {String}
5088
- * @example
5089
- * ```js
5090
- * eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
5091
- * ```
5108
+ /**
5109
+ * @name TRANSFORM
5110
+ * @desc Returns the transform attribute with CSS vendor prefixes.
5111
+ * @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
5112
+ *
5113
+ * @constant
5114
+ * @type {String}
5115
+ * @example
5116
+ * ```js
5117
+ * eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
5118
+ * ```
5092
5119
  */
5093
5120
  Axes.TRANSFORM = TRANSFORM;
5094
- /**
5095
- * @name DIRECTION_NONE
5096
- * @constant
5097
- * @type {Number}
5121
+ /**
5122
+ * @name DIRECTION_NONE
5123
+ * @constant
5124
+ * @type {Number}
5098
5125
  */
5099
5126
  Axes.DIRECTION_NONE = DIRECTION_NONE;
5100
- /**
5101
- * @name DIRECTION_LEFT
5102
- * @constant
5103
- * @type {Number}
5127
+ /**
5128
+ * @name DIRECTION_LEFT
5129
+ * @constant
5130
+ * @type {Number}
5104
5131
  */
5105
5132
  Axes.DIRECTION_LEFT = DIRECTION_LEFT;
5106
- /**
5107
- * @name DIRECTION_RIGHT
5108
- * @constant
5109
- * @type {Number}
5133
+ /**
5134
+ * @name DIRECTION_RIGHT
5135
+ * @constant
5136
+ * @type {Number}
5110
5137
  */
5111
5138
  Axes.DIRECTION_RIGHT = DIRECTION_RIGHT;
5112
- /**
5113
- * @name DIRECTION_UP
5114
- * @constant
5115
- * @type {Number}
5139
+ /**
5140
+ * @name DIRECTION_UP
5141
+ * @constant
5142
+ * @type {Number}
5116
5143
  */
5117
5144
  Axes.DIRECTION_UP = DIRECTION_UP;
5118
- /**
5119
- * @name DIRECTION_DOWN
5120
- * @constant
5121
- * @type {Number}
5145
+ /**
5146
+ * @name DIRECTION_DOWN
5147
+ * @constant
5148
+ * @type {Number}
5122
5149
  */
5123
5150
  Axes.DIRECTION_DOWN = DIRECTION_DOWN;
5124
- /**
5125
- * @name DIRECTION_HORIZONTAL
5126
- * @constant
5127
- * @type {Number}
5151
+ /**
5152
+ * @name DIRECTION_HORIZONTAL
5153
+ * @constant
5154
+ * @type {Number}
5128
5155
  */
5129
5156
  Axes.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;
5130
- /**
5131
- * @name DIRECTION_VERTICAL
5132
- * @constant
5133
- * @type {Number}
5157
+ /**
5158
+ * @name DIRECTION_VERTICAL
5159
+ * @constant
5160
+ * @type {Number}
5134
5161
  */
5135
5162
  Axes.DIRECTION_VERTICAL = DIRECTION_VERTICAL;
5136
- /**
5137
- * @name DIRECTION_ALL
5138
- * @constant
5139
- * @type {Number}
5163
+ /**
5164
+ * @name DIRECTION_ALL
5165
+ * @constant
5166
+ * @type {Number}
5140
5167
  */
5141
5168
  Axes.DIRECTION_ALL = DIRECTION_ALL;
5142
5169
  __decorate([Computed], Axes.prototype, "holding", null);
@@ -5144,9 +5171,9 @@ version: 4.12.0-beta.1
5144
5171
  return Axes;
5145
5172
  }(Component);
5146
5173
 
5147
- /*
5148
- * Copyright (c) 2015 NAVER Corp.
5149
- * egjs projects are licensed under the MIT license
5174
+ /*
5175
+ * Copyright (c) 2015 NAVER Corp.
5176
+ * egjs projects are licensed under the MIT license
5150
5177
  */
5151
5178
  // get user's direction
5152
5179
  var getDirectionByAngle = function (angle, thresholdAngle) {
@@ -5156,73 +5183,73 @@ version: 4.12.0-beta.1
5156
5183
  var toAngle = Math.abs(angle);
5157
5184
  return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
5158
5185
  };
5159
- /**
5160
- * @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
5161
- * @ko eg.Axes.PanInput 모듈의 옵션 객체
5162
- * @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
5163
- * - touch: Touch screen
5164
- * - mouse: Mouse
5165
- * - pointer: Mouse and touch <ko>입력 장치 종류
5166
- * - touch: 터치 입력 장치
5167
- * - mouse: 마우스
5168
- * - pointer: 마우스 및 터치</ko>
5169
- * @param {String[]} [inputKey=["any"]] List of key combinations to allow input
5170
- * - any: any key
5171
- * - shift: shift key
5172
- * - ctrl: ctrl key and pinch gesture on the trackpad
5173
- * - alt: alt key
5174
- * - meta: meta key
5175
- * - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
5176
- * - any: 아무 키
5177
- * - shift: shift 키
5178
- * - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
5179
- * - alt: alt 키
5180
- * - meta: meta 키
5181
- * - none: 아무 키도 눌리지 않은 상태 </ko>
5182
- * @param {String[]} [inputButton=["left"]] List of buttons to allow input
5183
- * - left: Left mouse button and normal touch
5184
- * - middle: Mouse wheel press
5185
- * - right: Right mouse button <ko>입력을 허용할 버튼 목록
5186
- * - left: 마우스 왼쪽 버튼
5187
- * - middle: 마우스 휠 눌림
5188
- * - right: 마우스 오른쪽 버튼 </ko>
5189
- * @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
5190
- * @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
5191
- * @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
5192
- * @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
5193
- * @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
5194
- * @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>
5195
- * @param {Boolean} [preventDefaultOnDrag=false] Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging <ko>사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부</ko>
5196
- * @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>
5197
- * @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>
5186
+ /**
5187
+ * @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
5188
+ * @ko eg.Axes.PanInput 모듈의 옵션 객체
5189
+ * @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
5190
+ * - touch: Touch screen
5191
+ * - mouse: Mouse
5192
+ * - pointer: Mouse and touch <ko>입력 장치 종류
5193
+ * - touch: 터치 입력 장치
5194
+ * - mouse: 마우스
5195
+ * - pointer: 마우스 및 터치</ko>
5196
+ * @param {String[]} [inputKey=["any"]] List of key combinations to allow input
5197
+ * - any: any key
5198
+ * - shift: shift key
5199
+ * - ctrl: ctrl key and pinch gesture on the trackpad
5200
+ * - alt: alt key
5201
+ * - meta: meta key
5202
+ * - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
5203
+ * - any: 아무 키
5204
+ * - shift: shift 키
5205
+ * - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
5206
+ * - alt: alt 키
5207
+ * - meta: meta 키
5208
+ * - none: 아무 키도 눌리지 않은 상태 </ko>
5209
+ * @param {String[]} [inputButton=["left"]] List of buttons to allow input
5210
+ * - left: Left mouse button and normal touch
5211
+ * - middle: Mouse wheel press
5212
+ * - right: Right mouse button <ko>입력을 허용할 버튼 목록
5213
+ * - left: 마우스 왼쪽 버튼
5214
+ * - middle: 마우스 휠 눌림
5215
+ * - right: 마우스 오른쪽 버튼 </ko>
5216
+ * @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
5217
+ * @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
5218
+ * @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
5219
+ * @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
5220
+ * @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
5221
+ * @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>
5222
+ * @param {Boolean} [preventDefaultOnDrag=false] Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging <ko>사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부</ko>
5223
+ * @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>
5224
+ * @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>
5198
5225
  **/
5199
- /**
5200
- * 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.
5201
- * @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
5202
- *
5203
- * @example
5204
- * ```js
5205
- * const pan = new eg.Axes.PanInput("#area", {
5206
- * inputType: ["touch"],
5207
- * scale: [1, 1.3],
5208
- * });
5209
- *
5210
- * // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5211
- * // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5212
- * axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
5213
- *
5214
- * // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5215
- * axes.connect(["something1"], pan); // or axes.connect("something1", pan);
5216
- *
5217
- * // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5218
- * axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
5219
- * ```
5220
- * @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
5221
- * @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
5226
+ /**
5227
+ * 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.
5228
+ * @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
5229
+ *
5230
+ * @example
5231
+ * ```js
5232
+ * const pan = new eg.Axes.PanInput("#area", {
5233
+ * inputType: ["touch"],
5234
+ * scale: [1, 1.3],
5235
+ * });
5236
+ *
5237
+ * // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5238
+ * // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5239
+ * axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
5240
+ *
5241
+ * // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
5242
+ * axes.connect(["something1"], pan); // or axes.connect("something1", pan);
5243
+ *
5244
+ * // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
5245
+ * axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
5246
+ * ```
5247
+ * @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
5248
+ * @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
5222
5249
  */
5223
5250
  var PanInput = /*#__PURE__*/function () {
5224
- /**
5225
- *
5251
+ /**
5252
+ *
5226
5253
  */
5227
5254
  function PanInput(el, options) {
5228
5255
  var _this = this;
@@ -5271,56 +5298,60 @@ version: 4.12.0-beta.1
5271
5298
  this._detachWindowEvent(this._activeEvent);
5272
5299
  }
5273
5300
  this._attachElementEvent(observer);
5274
- this._originalCssProps = setCssProps(this.element, this.options, this._direction);
5275
5301
  return this;
5276
5302
  };
5277
5303
  __proto.disconnect = function () {
5278
5304
  this._detachElementEvent();
5279
5305
  this._detachWindowEvent(this._activeEvent);
5280
- if (!isCssPropsFromAxes(this._originalCssProps)) {
5281
- revertCssProps(this.element, this._originalCssProps);
5282
- }
5283
5306
  this._direction = DIRECTION_NONE;
5284
5307
  return this;
5285
5308
  };
5286
- /**
5287
- * Destroys elements, properties, and events used in a module.
5288
- * @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
5309
+ /**
5310
+ * Destroys elements, properties, and events used in a module.
5311
+ * @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
5289
5312
  */
5290
5313
  __proto.destroy = function () {
5291
5314
  this.disconnect();
5292
5315
  this.element = null;
5293
5316
  };
5294
- /**
5295
- * Enables input devices
5296
- * @ko 입력 장치를 사용할 수 있게 한다
5297
- * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5317
+ /**
5318
+ * Enables input devices
5319
+ * @ko 입력 장치를 사용할 수 있게 한다
5320
+ * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5298
5321
  */
5299
5322
  __proto.enable = function () {
5300
- this._enabled = true;
5323
+ if (!this._enabled) {
5324
+ this._enabled = true;
5325
+ this._originalCssProps = setCssProps(this.element, this.options, this._direction);
5326
+ }
5301
5327
  return this;
5302
5328
  };
5303
- /**
5304
- * Disables input devices
5305
- * @ko 입력 장치를 사용할 수 없게 한다.
5306
- * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5329
+ /**
5330
+ * Disables input devices
5331
+ * @ko 입력 장치를 사용할 수 없게 한다.
5332
+ * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5307
5333
  */
5308
5334
  __proto.disable = function () {
5309
- this._enabled = false;
5335
+ if (this._enabled) {
5336
+ this._enabled = false;
5337
+ if (!isCssPropsFromAxes(this._originalCssProps)) {
5338
+ revertCssProps(this.element, this._originalCssProps);
5339
+ }
5340
+ }
5310
5341
  return this;
5311
5342
  };
5312
- /**
5313
- * Returns whether to use an input device
5314
- * @ko 입력 장치 사용 여부를 반환한다.
5315
- * @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
5343
+ /**
5344
+ * Returns whether to use an input device
5345
+ * @ko 입력 장치 사용 여부를 반환한다.
5346
+ * @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
5316
5347
  */
5317
5348
  __proto.isEnabled = function () {
5318
5349
  return this._enabled;
5319
5350
  };
5320
- /**
5321
- * Releases current user input.
5322
- * @ko 사용자의 입력을 강제로 중단시킨다.
5323
- * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5351
+ /**
5352
+ * Releases current user input.
5353
+ * @ko 사용자의 입력을 강제로 중단시킨다.
5354
+ * @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
5324
5355
  */
5325
5356
  __proto.release = function () {
5326
5357
  var activeEvent = this._activeEvent;
@@ -5463,7 +5494,7 @@ version: 4.12.0-beta.1
5463
5494
  throw new Error("Element to connect input does not exist.");
5464
5495
  }
5465
5496
  this._observer = observer;
5466
- this._enabled = true;
5497
+ this.enable();
5467
5498
  this._activeEvent = activeEvent;
5468
5499
  element.addEventListener("click", this._preventClickWhenDragged, true);
5469
5500
  activeEvent.start.forEach(function (event) {
@@ -5487,15 +5518,15 @@ version: 4.12.0-beta.1
5487
5518
  element.removeEventListener(event, _this._voidFunction);
5488
5519
  });
5489
5520
  }
5490
- this._enabled = false;
5521
+ this.disable();
5491
5522
  this._observer = null;
5492
5523
  };
5493
5524
  return PanInput;
5494
5525
  }();
5495
5526
 
5496
- /*
5497
- * Copyright (c) 2015 NAVER Corp.
5498
- * egjs projects are licensed under the MIT license
5527
+ /*
5528
+ * Copyright (c) 2015 NAVER Corp.
5529
+ * egjs projects are licensed under the MIT license
5499
5530
  */
5500
5531
 
5501
5532
  var Axes$1 = Axes;
@@ -5774,6 +5805,9 @@ version: 4.12.0-beta.1
5774
5805
  axesEvent = ctx.axesEvent,
5775
5806
  transitTo = ctx.transitTo;
5776
5807
  var inputEvent = axesEvent.inputEvent;
5808
+ if (!inputEvent) {
5809
+ return;
5810
+ }
5777
5811
  var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY;
5778
5812
  var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
5779
5813
  isTrusted: axesEvent.isTrusted,
@@ -7949,6 +7983,7 @@ version: 4.12.0-beta.1
7949
7983
  var _this = this;
7950
7984
  var _b = (_a === void 0 ? {} : _a).align,
7951
7985
  align = _b === void 0 ? ALIGN.CENTER : _b;
7986
+ this._lookedOffset = 0;
7952
7987
  this._checkTranslateSupport = function () {
7953
7988
  var e_1, _a;
7954
7989
  var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
@@ -8308,6 +8343,8 @@ version: 4.12.0-beta.1
8308
8343
  */
8309
8344
  __proto.lookAt = function (pos) {
8310
8345
  var _this = this;
8346
+ var prevOffset = this._offset;
8347
+ var isChangedOffset = this._lookedOffset !== prevOffset;
8311
8348
  var flicking = getFlickingAttached(this._flicking);
8312
8349
  var prevPos = this._position;
8313
8350
  this._position = pos;
@@ -8318,7 +8355,12 @@ version: 4.12.0-beta.1
8318
8355
  if (toggled) {
8319
8356
  void flicking.renderer.render().then(function () {
8320
8357
  _this.updateOffset();
8358
+ _this._lookedOffset = _this._offset;
8321
8359
  });
8360
+ } else if (isChangedOffset) {
8361
+ // sync offset for renderOnlyVisible on resize
8362
+ this.updateOffset();
8363
+ this._lookedOffset = this._offset;
8322
8364
  } else {
8323
8365
  this.applyTransform();
8324
8366
  }
@@ -8493,8 +8535,8 @@ version: 4.12.0-beta.1
8493
8535
  return this;
8494
8536
  };
8495
8537
  /**
8496
- * Update Viewport's height to active panel's height
8497
- * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
8538
+ * Update Viewport's height to visible panel's max height
8539
+ * @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
8498
8540
  * @throws {FlickingError}
8499
8541
  * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
8500
8542
  * <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
@@ -8504,9 +8546,17 @@ version: 4.12.0-beta.1
8504
8546
  __proto.updateAdaptiveHeight = function () {
8505
8547
  var flicking = getFlickingAttached(this._flicking);
8506
8548
  var activePanel = flicking.control.activePanel;
8507
- if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;
8549
+ var visiblePanels = flicking.visiblePanels;
8550
+ var selectedPanels = __spread$1(visiblePanels);
8551
+ if (activePanel) {
8552
+ selectedPanels.push(activePanel);
8553
+ }
8554
+ if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
8555
+ var maxHeight = Math.max.apply(Math, __spread$1(selectedPanels.map(function (panel) {
8556
+ return panel.height;
8557
+ })));
8508
8558
  flicking.viewport.setSize({
8509
- height: activePanel.height
8559
+ height: maxHeight
8510
8560
  });
8511
8561
  };
8512
8562
  /**
@@ -8577,6 +8627,7 @@ version: 4.12.0-beta.1
8577
8627
  };
8578
8628
  __proto._resetInternalValues = function () {
8579
8629
  this._position = 0;
8630
+ this._lookedOffset = 0;
8580
8631
  this._alignPos = 0;
8581
8632
  this._offset = 0;
8582
8633
  this._circularOffset = 0;
@@ -10520,6 +10571,9 @@ version: 4.12.0-beta.1
10520
10571
  var flicking = this._flicking;
10521
10572
  var horizontal = flicking.horizontal,
10522
10573
  useFractionalSize = flicking.useFractionalSize;
10574
+ if (!el) {
10575
+ return this;
10576
+ }
10523
10577
  if (cached) {
10524
10578
  this._size = cached.size;
10525
10579
  this._margin = __assign$2({}, cached.margin);
@@ -12995,186 +13049,341 @@ version: 4.12.0-beta.1
12995
13049
  * Flicking.VERSION; // ex) 4.0.0
12996
13050
  * ```
12997
13051
  */
12998
- Flicking.VERSION = "4.12.0-beta.1";
13052
+ Flicking.VERSION = "4.12.0-beta.11";
12999
13053
  return Flicking;
13000
13054
  }(Component);
13001
13055
 
13002
- /*
13003
- * Copyright (c) 2015 NAVER Corp.
13004
- * egjs projects are licensed under the MIT license
13005
- */
13006
- /**
13007
- * @extends Component
13008
- * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
13009
- * @requires {@link https://github.com/naver/egjs-component|@egjs/component}
13010
- * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
13011
- */
13056
+ var SIDE_EVENTS = {
13057
+ HOLD_START: "sideHoldStart",
13058
+ HOLD_END: "sideHoldEnd",
13059
+ MOVE_START: "sideMoveStart",
13060
+ MOVE: "sideMove",
13061
+ MOVE_END: "sideMoveEnd",
13062
+ WILL_CHANGE: "sideWillChange",
13063
+ CHANGED: "sideChanged",
13064
+ WILL_RESTORE: "sideWillRestore",
13065
+ RESTORED: "sideRestored"
13066
+ };
13012
13067
  var CrossFlicking = /*#__PURE__*/function (_super) {
13013
13068
  __extends$3(CrossFlicking, _super);
13014
- // Options Setter
13015
- // UI / LAYOUT
13016
- // public set align(val: FlickingOptions["align"]) {
13017
- // this._align = val;
13018
- // }
13019
- function CrossFlicking(root, _a) {
13020
- var _b = (_a === void 0 ? {} : _a).verticalOptions,
13021
- verticalOptions = _b === void 0 ? undefined : _b;
13022
- var _this = _super.call(this, root) || this;
13069
+ function CrossFlicking(root, options) {
13070
+ var _this = _super.call(this, root, options) || this;
13071
+ _this._syncToCategory = function (index, outerIndex) {
13072
+ if (_this._disableIndexSync) {
13073
+ return;
13074
+ }
13075
+ _this.stopAnimation();
13076
+ _this._sideFlicking.forEach(function (child, i) {
13077
+ var _a = _this._sideState[i],
13078
+ start = _a.start,
13079
+ end = _a.end;
13080
+ if (start <= index && end >= index && outerIndex !== i) {
13081
+ child.stopAnimation();
13082
+ void child.moveTo(index, 0);
13083
+ void _this.moveTo(i, 0);
13084
+ }
13085
+ });
13086
+ };
13087
+ _this._setDraggable = function (direction, draggable) {
13088
+ if (!_this._disableSlideOnHold) {
13089
+ return;
13090
+ }
13091
+ var dragThreshold = _this._originalDragThreshold;
13092
+ var threshold = draggable ? dragThreshold && dragThreshold >= 10 ? dragThreshold : 10 : Infinity;
13093
+ if (direction === MOVE_DIRECTION.HORIZONTAL === _this.horizontal) {
13094
+ _this.dragThreshold = threshold;
13095
+ } else if (direction === MOVE_DIRECTION.VERTICAL === _this.horizontal) {
13096
+ _this._sideFlicking.forEach(function (child) {
13097
+ child.dragThreshold = threshold;
13098
+ });
13099
+ }
13100
+ };
13101
+ _this._setPreviousSideIndex = function () {
13102
+ _this._sideFlicking.forEach(function (child, i) {
13103
+ var _a = _this._sideState[i],
13104
+ start = _a.start,
13105
+ end = _a.end;
13106
+ if (_this._preserveIndex) {
13107
+ if (_this._nextIndex !== i) {
13108
+ if (child.index < start) {
13109
+ child.stopAnimation();
13110
+ void child.moveTo(start, 0);
13111
+ } else if (child.index > end) {
13112
+ child.stopAnimation();
13113
+ void child.moveTo(end, 0);
13114
+ }
13115
+ }
13116
+ } else {
13117
+ if (_this._nextIndex !== i) {
13118
+ void child.moveTo(start, 0);
13119
+ }
13120
+ }
13121
+ });
13122
+ };
13023
13123
  _this._onHorizontalHoldStart = function () {
13024
- _this.dragThreshold = 10;
13124
+ _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
13025
13125
  _this._moveDirection = null;
13026
13126
  };
13027
13127
  _this._onHorizontalMove = function (e) {
13028
13128
  if (e.isTrusted && !_this._moveDirection) {
13029
- _this._verticalFlicking.forEach(function (child) {
13030
- child.dragThreshold = Infinity;
13031
- });
13129
+ _this._setDraggable(MOVE_DIRECTION.VERTICAL, false);
13032
13130
  _this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
13033
13131
  }
13034
13132
  };
13035
13133
  _this._onHorizontalMoveEnd = function (e) {
13036
13134
  var visiblePanels = _this.visiblePanels;
13037
- _this._verticalFlicking.forEach(function (child) {
13038
- child.dragThreshold = 10;
13039
- });
13040
- _this._moveDirection = null;
13041
13135
  if (visiblePanels.length > 1) {
13042
13136
  _this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
13043
13137
  } else {
13044
13138
  _this._nextIndex = visiblePanels[0].index;
13045
13139
  }
13046
- _this._verticalFlicking.forEach(function (child, i) {
13047
- if (_this._nextIndex !== i) {
13048
- var _a = _this._verticalState[i],
13049
- start = _a.start,
13050
- end = _a.end;
13051
- if (child.index < start) {
13052
- child.stopAnimation();
13053
- void child.moveTo(start, 0);
13054
- } else if (child.index > end) {
13055
- child.stopAnimation();
13056
- void child.moveTo(end, 0);
13057
- }
13058
- }
13140
+ _this._setDraggable(MOVE_DIRECTION.VERTICAL, true);
13141
+ _this._moveDirection = null;
13142
+ // _syncToCategory에서 완전히 가로 이동이 이루어지기 전에 세로 방향 index가 변하는 경우가 있어 requestAnimationFrame 처리
13143
+ requestAnimationFrame(function () {
13144
+ return _this._setPreviousSideIndex();
13059
13145
  });
13060
13146
  if (e.isTrusted) {
13061
- _this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
13147
+ _this._syncToCategory(_this._sideFlicking[_this._nextIndex].index, _this._nextIndex);
13062
13148
  }
13063
13149
  };
13064
- _this._onVerticalHoldStart = function () {
13065
- _this._verticalFlicking.forEach(function (child) {
13066
- child.dragThreshold = 10;
13067
- });
13150
+ _this._onSideHoldStart = function () {
13151
+ _this._setDraggable(MOVE_DIRECTION.VERTICAL, true);
13068
13152
  _this._moveDirection = null;
13069
13153
  };
13070
- _this._onVerticalMove = function (e) {
13154
+ _this._onSideMove = function (e) {
13071
13155
  if (e.isTrusted && !_this._moveDirection) {
13072
- _this.dragThreshold = Infinity;
13156
+ _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, false);
13073
13157
  _this._moveDirection = MOVE_DIRECTION.VERTICAL;
13074
13158
  }
13075
13159
  };
13076
- _this._onVerticalMoveEnd = function () {
13077
- _this.dragThreshold = 10;
13160
+ _this._onSideMoveEnd = function () {
13161
+ _this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
13078
13162
  _this._moveDirection = null;
13079
13163
  };
13080
- _this._onVerticalChanged = function (e) {
13081
- // this.visiblePanels.length 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
13082
- // 경우 가로 방향 Flicking의 이동이 완전히 끝난 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
13083
- if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
13164
+ _this._onSideChanged = function (e) {
13165
+ // If this.visiblePanels.length >= 2, it means that horizontal flicking is being dragged.
13166
+ // In this case, syncToCategory in _onHorizontalMoveEnd will fire after moving finishes, so we don't fire it here.
13167
+ if (_this.visiblePanels.length < 2 && _this._sideFlicking[_this.index] === e.currentTarget) {
13084
13168
  _this._syncToCategory(e.index, _this.index);
13085
13169
  }
13086
13170
  };
13171
+ var _a = options.sideOptions,
13172
+ sideOptions = _a === void 0 ? {} : _a,
13173
+ _b = options.preserveIndex,
13174
+ preserveIndex = _b === void 0 ? true : _b,
13175
+ _c = options.disableSlideOnHold,
13176
+ disableSlideOnHold = _c === void 0 ? true : _c,
13177
+ _d = options.disableIndexSync,
13178
+ disableIndexSync = _d === void 0 ? false : _d;
13087
13179
  // Internal states
13088
- _this._verticalState = [];
13089
13180
  _this._moveDirection = null;
13090
13181
  _this._nextIndex = 0;
13182
+ _this._originalDragThreshold = _this.dragThreshold;
13091
13183
  // Bind options
13092
- _this._verticalOptions = verticalOptions;
13184
+ _this._sideOptions = sideOptions;
13185
+ _this._preserveIndex = preserveIndex;
13186
+ _this._disableSlideOnHold = disableSlideOnHold;
13187
+ _this._disableIndexSync = disableIndexSync;
13093
13188
  return _this;
13094
- // Create core components
13095
- // this._viewport = new Viewport(this, getElement(root));
13096
13189
  }
13097
13190
  var __proto = CrossFlicking.prototype;
13098
- Object.defineProperty(__proto, "verticalOptions", {
13191
+ Object.defineProperty(__proto, "sideFlicking", {
13099
13192
  // Components
13100
- /**
13101
- * Change active panel index on mouse/touch hold while animating.
13102
- * `index` of the `willChange`/`willRestore` event will be used as new index.
13103
- * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
13104
- * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
13105
- * @type {FlickingOptions}
13106
- * @default undefined
13107
- * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
13108
- */
13109
13193
  get: function () {
13110
- return this._verticalOptions;
13194
+ return this._sideFlicking;
13195
+ },
13196
+ enumerable: false,
13197
+ configurable: true
13198
+ });
13199
+ Object.defineProperty(__proto, "sideState", {
13200
+ get: function () {
13201
+ return this._sideState;
13202
+ },
13203
+ enumerable: false,
13204
+ configurable: true
13205
+ });
13206
+ Object.defineProperty(__proto, "sideOptions", {
13207
+ // Options Getter
13208
+ get: function () {
13209
+ return this._sideOptions;
13210
+ },
13211
+ // Options Setter
13212
+ set: function (val) {
13213
+ this._sideOptions = val;
13214
+ },
13215
+ enumerable: false,
13216
+ configurable: true
13217
+ });
13218
+ Object.defineProperty(__proto, "preserveIndex", {
13219
+ get: function () {
13220
+ return this._preserveIndex;
13221
+ },
13222
+ set: function (val) {
13223
+ this._preserveIndex = val;
13224
+ },
13225
+ enumerable: false,
13226
+ configurable: true
13227
+ });
13228
+ Object.defineProperty(__proto, "disableSlideOnHold", {
13229
+ get: function () {
13230
+ return this._disableSlideOnHold;
13231
+ },
13232
+ set: function (val) {
13233
+ this._disableSlideOnHold = val;
13234
+ },
13235
+ enumerable: false,
13236
+ configurable: true
13237
+ });
13238
+ Object.defineProperty(__proto, "disableIndexSync", {
13239
+ get: function () {
13240
+ return this._disableIndexSync;
13241
+ },
13242
+ set: function (val) {
13243
+ this._disableIndexSync = val;
13111
13244
  },
13112
13245
  enumerable: false,
13113
13246
  configurable: true
13114
13247
  });
13115
- /**
13116
- * Initialize Flicking and move to the default index
13117
- * This is automatically called on Flicking's constructor when `autoInit` is true(default)
13118
- * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
13119
- * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
13120
- * @fires Flicking#ready
13121
- * @return {Promise<void>}
13122
- */
13123
13248
  __proto.init = function () {
13124
13249
  var _this = this;
13125
13250
  return _super.prototype.init.call(this).then(function () {
13126
- // data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
13127
- // camera.children들에 대해 갯수 세기
13128
- var verticalPanels = "";
13129
- _this._verticalState = _this.camera.children.reduce(function (state, child) {
13130
- var start = state.length ? +state[state.length - 1].end + 1 : 0;
13131
- verticalPanels += child.children[0].innerHTML;
13132
- return __spread$1(state, [{
13133
- start: start,
13134
- end: start + child.children[0].children.length - 1,
13135
- element: child
13136
- }]);
13137
- }, []);
13138
- _this.camera.children.forEach(function (child) {
13139
- child.children[0].innerHTML = verticalPanels;
13251
+ _this._sideState = _this._createSideState();
13252
+ _this._sideFlicking = _this._createSideFlicking();
13253
+ _this._addComponentEvents();
13254
+ });
13255
+ };
13256
+ __proto.destroy = function () {
13257
+ this._sideFlicking.forEach(function (flicking) {
13258
+ flicking.destroy();
13259
+ });
13260
+ _super.prototype.destroy.call(this);
13261
+ };
13262
+ __proto._addComponentEvents = function () {
13263
+ var _this = this;
13264
+ this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
13265
+ this.on(EVENTS.MOVE, this._onHorizontalMove);
13266
+ this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
13267
+ this._sideFlicking.forEach(function (flicking, mainIndex) {
13268
+ flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
13269
+ flicking.on(EVENTS.MOVE, _this._onSideMove);
13270
+ flicking.on(EVENTS.MOVE_END, _this._onSideMoveEnd);
13271
+ flicking.on(EVENTS.CHANGED, _this._onSideChanged);
13272
+ Object.keys(SIDE_EVENTS).forEach(function (name) {
13273
+ flicking.on(EVENTS[name], function (event) {
13274
+ _this.trigger(new ComponentEvent$1(SIDE_EVENTS[name], __assign$2({
13275
+ mainIndex: mainIndex
13276
+ }, event)));
13277
+ });
13140
13278
  });
13141
- _this._verticalFlicking = _this.camera.children.map(function (child, i) {
13142
- return new Flicking(child, __assign$2(__assign$2({}, _this.verticalOptions), {
13143
- horizontal: false,
13144
- panelsPerView: 1,
13145
- defaultIndex: _this._verticalState[i].start
13146
- }));
13279
+ });
13280
+ };
13281
+ __proto._createSideState = function () {
13282
+ var viewportEl = this.element;
13283
+ var cameraEl = this.camera.element;
13284
+ var panels = toArray$2(cameraEl.children);
13285
+ var isCrossStructure = getDataAttributes(viewportEl, "data-cross-").structure;
13286
+ var sideState = [];
13287
+ if (!isCrossStructure) {
13288
+ var groupPanels = this._getGroupFromAttribute(panels);
13289
+ var groupKeys = Object.keys(groupPanels);
13290
+ if (groupKeys.length) {
13291
+ sideState = this._getSideStateFromGroup(groupPanels);
13292
+ this.remove(0, this.panelCount - groupKeys.length);
13293
+ } else {
13294
+ sideState = this._getSideStateFromPanels(panels);
13295
+ }
13296
+ this._createCrossStructure(sideState);
13297
+ } else {
13298
+ sideState = this._getSideStateFromCrossStructure(panels);
13299
+ }
13300
+ void this.resize();
13301
+ return sideState;
13302
+ };
13303
+ __proto._createCrossStructure = function (sideState) {
13304
+ var _this = this;
13305
+ var sideCamera = document.createElement("div");
13306
+ var sidePanels = "";
13307
+ sideCamera.classList.add(CLASS.CAMERA);
13308
+ sideState.forEach(function (state, i) {
13309
+ var panel = _this.camera.children[i];
13310
+ sidePanels += state.element.innerHTML;
13311
+ Array.from(panel.attributes).forEach(function (attribute) {
13312
+ return panel.removeAttribute(attribute.name);
13147
13313
  });
13148
- _this.on(EVENTS.HOLD_START, _this._onHorizontalHoldStart);
13149
- _this.on(EVENTS.MOVE, _this._onHorizontalMove);
13150
- _this.on(EVENTS.MOVE_END, _this._onHorizontalMoveEnd);
13151
- _this._verticalFlicking.forEach(function (child) {
13152
- child.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
13153
- child.on(EVENTS.MOVE, _this._onVerticalMove);
13154
- child.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
13155
- child.on(EVENTS.CHANGED, _this._onVerticalChanged);
13314
+ });
13315
+ sideCamera.innerHTML = sidePanels;
13316
+ sideState.forEach(function (_, i) {
13317
+ var panel = _this.camera.children[i];
13318
+ [CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
13319
+ if (!panel.classList.contains(className)) {
13320
+ panel.classList.add(className);
13321
+ }
13156
13322
  });
13323
+ panel.innerHTML = sideCamera.outerHTML;
13157
13324
  });
13325
+ this.element.setAttribute("data-cross-structure", "true");
13158
13326
  };
13159
- __proto._syncToCategory = function (index, outerIndex) {
13160
- var _this = this;
13161
- this.stopAnimation();
13162
- this._verticalFlicking.forEach(function (child, i) {
13163
- var _a = _this._verticalState[i],
13164
- start = _a.start,
13165
- end = _a.end;
13166
- if (start <= index && end >= index && outerIndex !== i) {
13167
- child.stopAnimation();
13168
- void child.moveTo(index, 0);
13169
- void _this.moveTo(i, 0);
13327
+ __proto._getGroupFromAttribute = function (panels) {
13328
+ var groupKeys = [];
13329
+ var groupPanels = {};
13330
+ panels.forEach(function (panel) {
13331
+ var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
13332
+ if (groupKey && !includes(groupKeys, groupKey)) {
13333
+ groupKeys.push(groupKey);
13334
+ groupPanels[groupKey] = [panel];
13335
+ } else if (groupKey) {
13336
+ groupPanels[groupKey].push(panel);
13170
13337
  }
13171
13338
  });
13339
+ return groupPanels;
13340
+ };
13341
+ __proto._getSideStateFromGroup = function (groupPanels) {
13342
+ return Object.keys(groupPanels).reduce(function (state, key) {
13343
+ var start = state.length ? +state[state.length - 1].end + 1 : 0;
13344
+ var element = groupPanels[key].reduce(function (el, panel) {
13345
+ el.innerHTML += panel.outerHTML;
13346
+ return el;
13347
+ }, document.createElement("div"));
13348
+ return __spread$1(state, [{
13349
+ key: key,
13350
+ start: start,
13351
+ end: start + groupPanels[key].length - 1,
13352
+ element: element
13353
+ }]);
13354
+ }, []);
13355
+ };
13356
+ __proto._getSideStateFromPanels = function (panels) {
13357
+ return panels.reduce(function (state, panel, i) {
13358
+ var start = state.length ? +state[state.length - 1].end + 1 : 0;
13359
+ return __spread$1(state, [{
13360
+ key: i.toString(),
13361
+ start: start,
13362
+ end: start + panel.children.length - 1,
13363
+ element: panel
13364
+ }]);
13365
+ }, []);
13366
+ };
13367
+ __proto._getSideStateFromCrossStructure = function (panels) {
13368
+ var groupPanels = this._getGroupFromAttribute(panels);
13369
+ return this._getSideStateFromGroup(groupPanels);
13370
+ };
13371
+ __proto._createSideFlicking = function () {
13372
+ var _this = this;
13373
+ return this.sideState.map(function (state, i) {
13374
+ return new Flicking(_this.camera.children[i], __assign$2(__assign$2({}, _this.sideOptions), {
13375
+ horizontal: false,
13376
+ panelsPerView: 1,
13377
+ defaultIndex: state.start
13378
+ }));
13379
+ });
13172
13380
  };
13173
13381
  return CrossFlicking;
13174
13382
  }(Flicking);
13175
13383
 
13176
13384
  var CrossFlicking$1 = {
13177
13385
  __proto__: null,
13386
+ SIDE_EVENTS: SIDE_EVENTS,
13178
13387
  CrossFlicking: CrossFlicking
13179
13388
  };
13180
13389