@egjs/flicking 4.12.0-beta.0 → 4.12.0-beta.2
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.
- package/declaration/CrossFlicking.d.ts +34 -0
- package/declaration/const/external.d.ts +6 -0
- package/declaration/index.d.ts +1 -0
- package/dist/flicking.cjs.js +247 -2
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +244 -3
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +250 -2
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +1015 -760
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/CrossFlicking.ts +296 -0
- package/src/const/external.ts +14 -0
- package/src/index.ts +2 -0
- package/src/index.umd.ts +2 -0
package/dist/flicking.pkgd.js
CHANGED
|
@@ -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.
|
|
7
|
+
version: 4.12.0-beta.2
|
|
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.0
|
|
|
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"
|
|
@@ -820,6 +822,17 @@ version: 4.12.0-beta.0
|
|
|
820
822
|
LTR: "ltr",
|
|
821
823
|
RTL: "rtl"
|
|
822
824
|
};
|
|
825
|
+
/**
|
|
826
|
+
* An object that contains the direction that {@link Flicking} is moving
|
|
827
|
+
* @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
|
|
828
|
+
* @type {object}
|
|
829
|
+
* @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
|
|
830
|
+
* @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
|
|
831
|
+
*/
|
|
832
|
+
var MOVE_DIRECTION = {
|
|
833
|
+
HORIZONTAL: "horizontal",
|
|
834
|
+
VERTICAL: "vertical"
|
|
835
|
+
};
|
|
823
836
|
|
|
824
837
|
var Constants = {
|
|
825
838
|
__proto__: null,
|
|
@@ -830,6 +843,7 @@ version: 4.12.0-beta.0
|
|
|
830
843
|
CLASS: CLASS,
|
|
831
844
|
CIRCULAR_FALLBACK: CIRCULAR_FALLBACK,
|
|
832
845
|
ORDER: ORDER,
|
|
846
|
+
MOVE_DIRECTION: MOVE_DIRECTION,
|
|
833
847
|
ERROR_CODE: CODE
|
|
834
848
|
};
|
|
835
849
|
|
|
@@ -2659,7 +2673,7 @@ version: 4.12.0-beta.0
|
|
|
2659
2673
|
license: MIT
|
|
2660
2674
|
author: NAVER Corp.
|
|
2661
2675
|
repository: https://github.com/naver/egjs-axes
|
|
2662
|
-
version: 3.9.0
|
|
2676
|
+
version: 3.9.1-beta.0
|
|
2663
2677
|
*/
|
|
2664
2678
|
|
|
2665
2679
|
/*! *****************************************************************************
|
|
@@ -2713,9 +2727,9 @@ version: 4.12.0-beta.0
|
|
|
2713
2727
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2714
2728
|
}
|
|
2715
2729
|
|
|
2716
|
-
/*
|
|
2717
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
2718
|
-
* egjs projects are licensed under the MIT license
|
|
2730
|
+
/*
|
|
2731
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2732
|
+
* egjs projects are licensed under the MIT license
|
|
2719
2733
|
*/
|
|
2720
2734
|
/* eslint-disable no-new-func, no-nested-ternary */
|
|
2721
2735
|
var win;
|
|
@@ -2730,9 +2744,9 @@ version: 4.12.0-beta.0
|
|
|
2730
2744
|
win = window;
|
|
2731
2745
|
}
|
|
2732
2746
|
|
|
2733
|
-
/*
|
|
2734
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
2735
|
-
* egjs projects are licensed under the MIT license
|
|
2747
|
+
/*
|
|
2748
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2749
|
+
* egjs projects are licensed under the MIT license
|
|
2736
2750
|
*/
|
|
2737
2751
|
var DIRECTION_NONE = 1;
|
|
2738
2752
|
var DIRECTION_LEFT = 2;
|
|
@@ -2858,19 +2872,19 @@ version: 4.12.0-beta.0
|
|
|
2858
2872
|
};
|
|
2859
2873
|
caf = win.clearTimeout;
|
|
2860
2874
|
}
|
|
2861
|
-
/**
|
|
2862
|
-
* A polyfill for the window.requestAnimationFrame() method.
|
|
2863
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
2864
|
-
* @private
|
|
2875
|
+
/**
|
|
2876
|
+
* A polyfill for the window.requestAnimationFrame() method.
|
|
2877
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
2878
|
+
* @private
|
|
2865
2879
|
*/
|
|
2866
2880
|
var requestAnimationFrame = function (fp) {
|
|
2867
2881
|
return raf(fp);
|
|
2868
2882
|
};
|
|
2869
|
-
/**
|
|
2870
|
-
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2871
|
-
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2872
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2873
|
-
* @private
|
|
2883
|
+
/**
|
|
2884
|
+
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2885
|
+
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2886
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2887
|
+
* @private
|
|
2874
2888
|
*/
|
|
2875
2889
|
var cancelAnimationFrame = function (key) {
|
|
2876
2890
|
caf(key);
|
|
@@ -2997,6 +3011,9 @@ version: 4.12.0-beta.0
|
|
|
2997
3011
|
});
|
|
2998
3012
|
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
2999
3013
|
oldCssProps[prop] = element.style[prop];
|
|
3014
|
+
});
|
|
3015
|
+
// Old style props like user-select can be corrupted if you change the style directly in the logic above.
|
|
3016
|
+
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
3000
3017
|
element.style[prop] = newCssProps_1[prop];
|
|
3001
3018
|
});
|
|
3002
3019
|
}
|
|
@@ -3016,32 +3033,32 @@ version: 4.12.0-beta.0
|
|
|
3016
3033
|
this._axes = _axes;
|
|
3017
3034
|
this.holdingCount = 0;
|
|
3018
3035
|
}
|
|
3019
|
-
/**
|
|
3020
|
-
* This event is fired when a user holds an element on the screen of the device.
|
|
3021
|
-
* @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
|
|
3022
|
-
* @event Axes#hold
|
|
3023
|
-
* @type {object}
|
|
3024
|
-
* @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
|
|
3025
|
-
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3026
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3027
|
-
* @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>
|
|
3028
|
-
*
|
|
3029
|
-
* @example
|
|
3030
|
-
* ```js
|
|
3031
|
-
* const axes = new eg.Axes({
|
|
3032
|
-
* "x": {
|
|
3033
|
-
* range: [0, 100]
|
|
3034
|
-
* },
|
|
3035
|
-
* "zoom": {
|
|
3036
|
-
* range: [50, 30]
|
|
3037
|
-
* }
|
|
3038
|
-
* }).on("hold", function(event) {
|
|
3039
|
-
* // event.pos
|
|
3040
|
-
* // event.input
|
|
3041
|
-
* // event.inputEvent
|
|
3042
|
-
* // isTrusted
|
|
3043
|
-
* });
|
|
3044
|
-
* ```
|
|
3036
|
+
/**
|
|
3037
|
+
* This event is fired when a user holds an element on the screen of the device.
|
|
3038
|
+
* @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
|
|
3039
|
+
* @event Axes#hold
|
|
3040
|
+
* @type {object}
|
|
3041
|
+
* @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
|
|
3042
|
+
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3043
|
+
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3044
|
+
* @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>
|
|
3045
|
+
*
|
|
3046
|
+
* @example
|
|
3047
|
+
* ```js
|
|
3048
|
+
* const axes = new eg.Axes({
|
|
3049
|
+
* "x": {
|
|
3050
|
+
* range: [0, 100]
|
|
3051
|
+
* },
|
|
3052
|
+
* "zoom": {
|
|
3053
|
+
* range: [50, 30]
|
|
3054
|
+
* }
|
|
3055
|
+
* }).on("hold", function(event) {
|
|
3056
|
+
* // event.pos
|
|
3057
|
+
* // event.input
|
|
3058
|
+
* // event.inputEvent
|
|
3059
|
+
* // isTrusted
|
|
3060
|
+
* });
|
|
3061
|
+
* ```
|
|
3045
3062
|
*/
|
|
3046
3063
|
var __proto = EventManager.prototype;
|
|
3047
3064
|
__proto.hold = function (pos, option) {
|
|
@@ -3053,78 +3070,78 @@ version: 4.12.0-beta.0
|
|
|
3053
3070
|
isTrusted: true
|
|
3054
3071
|
}));
|
|
3055
3072
|
};
|
|
3056
|
-
/**
|
|
3057
|
-
* Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
|
|
3058
|
-
* @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
|
|
3059
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3060
|
-
* @example
|
|
3061
|
-
* ```js
|
|
3062
|
-
* const axes = new eg.Axes({
|
|
3063
|
-
* "x": {
|
|
3064
|
-
* range: [0, 100]
|
|
3065
|
-
* },
|
|
3066
|
-
* "zoom": {
|
|
3067
|
-
* range: [50, 30]
|
|
3068
|
-
* }
|
|
3069
|
-
* }).on("change", function(event) {
|
|
3070
|
-
* event.holding && event.set({x: 10});
|
|
3071
|
-
* });
|
|
3072
|
-
* ```
|
|
3073
|
+
/**
|
|
3074
|
+
* Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
|
|
3075
|
+
* @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
|
|
3076
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3077
|
+
* @example
|
|
3078
|
+
* ```js
|
|
3079
|
+
* const axes = new eg.Axes({
|
|
3080
|
+
* "x": {
|
|
3081
|
+
* range: [0, 100]
|
|
3082
|
+
* },
|
|
3083
|
+
* "zoom": {
|
|
3084
|
+
* range: [50, 30]
|
|
3085
|
+
* }
|
|
3086
|
+
* }).on("change", function(event) {
|
|
3087
|
+
* event.holding && event.set({x: 10});
|
|
3088
|
+
* });
|
|
3089
|
+
* ```
|
|
3073
3090
|
*/
|
|
3074
|
-
/** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
|
|
3075
|
-
* @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
|
|
3076
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3077
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
3078
|
-
* @example
|
|
3079
|
-
* ```js
|
|
3080
|
-
* const axes = new eg.Axes({
|
|
3081
|
-
* "x": {
|
|
3082
|
-
* range: [0, 100]
|
|
3083
|
-
* },
|
|
3084
|
-
* "zoom": {
|
|
3085
|
-
* range: [50, 30]
|
|
3086
|
-
* }
|
|
3087
|
-
* }).on("animationStart", function(event) {
|
|
3088
|
-
* event.setTo({x: 10}, 2000);
|
|
3089
|
-
* });
|
|
3090
|
-
* ```
|
|
3091
|
+
/** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
|
|
3092
|
+
* @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
|
|
3093
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3094
|
+
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
3095
|
+
* @example
|
|
3096
|
+
* ```js
|
|
3097
|
+
* const axes = new eg.Axes({
|
|
3098
|
+
* "x": {
|
|
3099
|
+
* range: [0, 100]
|
|
3100
|
+
* },
|
|
3101
|
+
* "zoom": {
|
|
3102
|
+
* range: [50, 30]
|
|
3103
|
+
* }
|
|
3104
|
+
* }).on("animationStart", function(event) {
|
|
3105
|
+
* event.setTo({x: 10}, 2000);
|
|
3106
|
+
* });
|
|
3107
|
+
* ```
|
|
3091
3108
|
*/
|
|
3092
|
-
/**
|
|
3093
|
-
* This event is fired when a user release an element on the screen of the device.
|
|
3094
|
-
* @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
|
|
3095
|
-
* @event Axes#release
|
|
3096
|
-
* @type {object}
|
|
3097
|
-
* @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
|
|
3098
|
-
* @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
|
|
3099
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3100
|
-
* @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>
|
|
3101
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3102
|
-
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3103
|
-
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3104
|
-
* @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>
|
|
3105
|
-
*
|
|
3106
|
-
* @example
|
|
3107
|
-
* ```js
|
|
3108
|
-
* const axes = new eg.Axes({
|
|
3109
|
-
* "x": {
|
|
3110
|
-
* range: [0, 100]
|
|
3111
|
-
* },
|
|
3112
|
-
* "zoom": {
|
|
3113
|
-
* range: [50, 30]
|
|
3114
|
-
* }
|
|
3115
|
-
* }).on("release", function(event) {
|
|
3116
|
-
* // event.depaPos
|
|
3117
|
-
* // event.destPos
|
|
3118
|
-
* // event.delta
|
|
3119
|
-
* // event.input
|
|
3120
|
-
* // event.inputEvent
|
|
3121
|
-
* // event.setTo
|
|
3122
|
-
* // event.isTrusted
|
|
3123
|
-
*
|
|
3124
|
-
* // if you want to change the animation coordinates to move after the 'release' event.
|
|
3125
|
-
* event.setTo({x: 10}, 2000);
|
|
3126
|
-
* });
|
|
3127
|
-
* ```
|
|
3109
|
+
/**
|
|
3110
|
+
* This event is fired when a user release an element on the screen of the device.
|
|
3111
|
+
* @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
|
|
3112
|
+
* @event Axes#release
|
|
3113
|
+
* @type {object}
|
|
3114
|
+
* @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
|
|
3115
|
+
* @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
|
|
3116
|
+
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3117
|
+
* @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>
|
|
3118
|
+
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3119
|
+
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3120
|
+
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3121
|
+
* @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>
|
|
3122
|
+
*
|
|
3123
|
+
* @example
|
|
3124
|
+
* ```js
|
|
3125
|
+
* const axes = new eg.Axes({
|
|
3126
|
+
* "x": {
|
|
3127
|
+
* range: [0, 100]
|
|
3128
|
+
* },
|
|
3129
|
+
* "zoom": {
|
|
3130
|
+
* range: [50, 30]
|
|
3131
|
+
* }
|
|
3132
|
+
* }).on("release", function(event) {
|
|
3133
|
+
* // event.depaPos
|
|
3134
|
+
* // event.destPos
|
|
3135
|
+
* // event.delta
|
|
3136
|
+
* // event.input
|
|
3137
|
+
* // event.inputEvent
|
|
3138
|
+
* // event.setTo
|
|
3139
|
+
* // event.isTrusted
|
|
3140
|
+
*
|
|
3141
|
+
* // if you want to change the animation coordinates to move after the 'release' event.
|
|
3142
|
+
* event.setTo({x: 10}, 2000);
|
|
3143
|
+
* });
|
|
3144
|
+
* ```
|
|
3128
3145
|
*/
|
|
3129
3146
|
__proto.triggerRelease = function (param) {
|
|
3130
3147
|
var _a = this._getRoundPos(param.destPos, param.depaPos),
|
|
@@ -3137,43 +3154,43 @@ version: 4.12.0-beta.0
|
|
|
3137
3154
|
bounceRatio: this._getBounceRatio(roundPos)
|
|
3138
3155
|
})));
|
|
3139
3156
|
};
|
|
3140
|
-
/**
|
|
3141
|
-
* This event is fired when coordinate changes.
|
|
3142
|
-
* @ko 좌표가 변경됐을 때 발생하는 이벤트
|
|
3143
|
-
* @event Axes#change
|
|
3144
|
-
* @type {object}
|
|
3145
|
-
* @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
|
|
3146
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3147
|
-
* @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>
|
|
3148
|
-
* @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
|
|
3149
|
-
* @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>
|
|
3150
|
-
* @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3151
|
-
* @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
|
|
3152
|
-
* @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>
|
|
3153
|
-
*
|
|
3154
|
-
* @example
|
|
3155
|
-
* ```js
|
|
3156
|
-
* const axes = new eg.Axes({
|
|
3157
|
-
* "x": {
|
|
3158
|
-
* range: [0, 100]
|
|
3159
|
-
* },
|
|
3160
|
-
* "zoom": {
|
|
3161
|
-
* range: [50, 30]
|
|
3162
|
-
* }
|
|
3163
|
-
* }).on("change", function(event) {
|
|
3164
|
-
* // event.pos
|
|
3165
|
-
* // event.delta
|
|
3166
|
-
* // event.input
|
|
3167
|
-
* // event.inputEvent
|
|
3168
|
-
* // event.holding
|
|
3169
|
-
* // event.set
|
|
3170
|
-
* // event.isTrusted
|
|
3171
|
-
*
|
|
3172
|
-
* // if you want to change the coordinates to move after the 'change' event.
|
|
3173
|
-
* // it works when the holding value of the change event is true.
|
|
3174
|
-
* event.holding && event.set({x: 10});
|
|
3175
|
-
* });
|
|
3176
|
-
* ```
|
|
3157
|
+
/**
|
|
3158
|
+
* This event is fired when coordinate changes.
|
|
3159
|
+
* @ko 좌표가 변경됐을 때 발생하는 이벤트
|
|
3160
|
+
* @event Axes#change
|
|
3161
|
+
* @type {object}
|
|
3162
|
+
* @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
|
|
3163
|
+
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3164
|
+
* @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>
|
|
3165
|
+
* @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
|
|
3166
|
+
* @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>
|
|
3167
|
+
* @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3168
|
+
* @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
|
|
3169
|
+
* @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>
|
|
3170
|
+
*
|
|
3171
|
+
* @example
|
|
3172
|
+
* ```js
|
|
3173
|
+
* const axes = new eg.Axes({
|
|
3174
|
+
* "x": {
|
|
3175
|
+
* range: [0, 100]
|
|
3176
|
+
* },
|
|
3177
|
+
* "zoom": {
|
|
3178
|
+
* range: [50, 30]
|
|
3179
|
+
* }
|
|
3180
|
+
* }).on("change", function(event) {
|
|
3181
|
+
* // event.pos
|
|
3182
|
+
* // event.delta
|
|
3183
|
+
* // event.input
|
|
3184
|
+
* // event.inputEvent
|
|
3185
|
+
* // event.holding
|
|
3186
|
+
* // event.set
|
|
3187
|
+
* // event.isTrusted
|
|
3188
|
+
*
|
|
3189
|
+
* // if you want to change the coordinates to move after the 'change' event.
|
|
3190
|
+
* // it works when the holding value of the change event is true.
|
|
3191
|
+
* event.holding && event.set({x: 10});
|
|
3192
|
+
* });
|
|
3193
|
+
* ```
|
|
3177
3194
|
*/
|
|
3178
3195
|
__proto.triggerChange = function (pos, depaPos, option, holding) {
|
|
3179
3196
|
var _this = this;
|
|
@@ -3210,42 +3227,42 @@ version: 4.12.0-beta.0
|
|
|
3210
3227
|
}
|
|
3211
3228
|
return !event.isCanceled();
|
|
3212
3229
|
};
|
|
3213
|
-
/**
|
|
3214
|
-
* This event is fired when animation starts.
|
|
3215
|
-
* @ko 에니메이션이 시작할 때 발생한다.
|
|
3216
|
-
* @event Axes#animationStart
|
|
3217
|
-
* @type {object}
|
|
3218
|
-
* @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
|
|
3219
|
-
* @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
|
|
3220
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3221
|
-
* @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
|
|
3222
|
-
* @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>
|
|
3223
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3224
|
-
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3225
|
-
* @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>
|
|
3226
|
-
*
|
|
3227
|
-
* @example
|
|
3228
|
-
* ```js
|
|
3229
|
-
* const axes = new eg.Axes({
|
|
3230
|
-
* "x": {
|
|
3231
|
-
* range: [0, 100]
|
|
3232
|
-
* },
|
|
3233
|
-
* "zoom": {
|
|
3234
|
-
* range: [50, 30]
|
|
3235
|
-
* }
|
|
3236
|
-
* }).on("release", function(event) {
|
|
3237
|
-
* // event.depaPos
|
|
3238
|
-
* // event.destPos
|
|
3239
|
-
* // event.delta
|
|
3240
|
-
* // event.input
|
|
3241
|
-
* // event.inputEvent
|
|
3242
|
-
* // event.setTo
|
|
3243
|
-
* // event.isTrusted
|
|
3244
|
-
*
|
|
3245
|
-
* // if you want to change the animation coordinates to move after the 'animationStart' event.
|
|
3246
|
-
* event.setTo({x: 10}, 2000);
|
|
3247
|
-
* });
|
|
3248
|
-
* ```
|
|
3230
|
+
/**
|
|
3231
|
+
* This event is fired when animation starts.
|
|
3232
|
+
* @ko 에니메이션이 시작할 때 발생한다.
|
|
3233
|
+
* @event Axes#animationStart
|
|
3234
|
+
* @type {object}
|
|
3235
|
+
* @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
|
|
3236
|
+
* @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
|
|
3237
|
+
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3238
|
+
* @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
|
|
3239
|
+
* @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>
|
|
3240
|
+
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3241
|
+
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3242
|
+
* @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>
|
|
3243
|
+
*
|
|
3244
|
+
* @example
|
|
3245
|
+
* ```js
|
|
3246
|
+
* const axes = new eg.Axes({
|
|
3247
|
+
* "x": {
|
|
3248
|
+
* range: [0, 100]
|
|
3249
|
+
* },
|
|
3250
|
+
* "zoom": {
|
|
3251
|
+
* range: [50, 30]
|
|
3252
|
+
* }
|
|
3253
|
+
* }).on("release", function(event) {
|
|
3254
|
+
* // event.depaPos
|
|
3255
|
+
* // event.destPos
|
|
3256
|
+
* // event.delta
|
|
3257
|
+
* // event.input
|
|
3258
|
+
* // event.inputEvent
|
|
3259
|
+
* // event.setTo
|
|
3260
|
+
* // event.isTrusted
|
|
3261
|
+
*
|
|
3262
|
+
* // if you want to change the animation coordinates to move after the 'animationStart' event.
|
|
3263
|
+
* event.setTo({x: 10}, 2000);
|
|
3264
|
+
* });
|
|
3265
|
+
* ```
|
|
3249
3266
|
*/
|
|
3250
3267
|
__proto.triggerAnimationStart = function (param) {
|
|
3251
3268
|
var _a = this._getRoundPos(param.destPos, param.depaPos),
|
|
@@ -3258,26 +3275,26 @@ version: 4.12.0-beta.0
|
|
|
3258
3275
|
this._axes.trigger(event);
|
|
3259
3276
|
return !event.isCanceled();
|
|
3260
3277
|
};
|
|
3261
|
-
/**
|
|
3262
|
-
* This event is fired when animation ends.
|
|
3263
|
-
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3264
|
-
* @event Axes#animationEnd
|
|
3265
|
-
* @type {object}
|
|
3266
|
-
* @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>
|
|
3267
|
-
*
|
|
3268
|
-
* @example
|
|
3269
|
-
* ```js
|
|
3270
|
-
* const axes = new eg.Axes({
|
|
3271
|
-
* "x": {
|
|
3272
|
-
* range: [0, 100]
|
|
3273
|
-
* },
|
|
3274
|
-
* "zoom": {
|
|
3275
|
-
* range: [50, 30]
|
|
3276
|
-
* }
|
|
3277
|
-
* }).on("animationEnd", function(event) {
|
|
3278
|
-
* // event.isTrusted
|
|
3279
|
-
* });
|
|
3280
|
-
* ```
|
|
3278
|
+
/**
|
|
3279
|
+
* This event is fired when animation ends.
|
|
3280
|
+
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3281
|
+
* @event Axes#animationEnd
|
|
3282
|
+
* @type {object}
|
|
3283
|
+
* @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>
|
|
3284
|
+
*
|
|
3285
|
+
* @example
|
|
3286
|
+
* ```js
|
|
3287
|
+
* const axes = new eg.Axes({
|
|
3288
|
+
* "x": {
|
|
3289
|
+
* range: [0, 100]
|
|
3290
|
+
* },
|
|
3291
|
+
* "zoom": {
|
|
3292
|
+
* range: [50, 30]
|
|
3293
|
+
* }
|
|
3294
|
+
* }).on("animationEnd", function(event) {
|
|
3295
|
+
* // event.isTrusted
|
|
3296
|
+
* });
|
|
3297
|
+
* ```
|
|
3281
3298
|
*/
|
|
3282
3299
|
__proto.triggerAnimationEnd = function (isTrusted) {
|
|
3283
3300
|
if (isTrusted === void 0) {
|
|
@@ -3287,26 +3304,26 @@ version: 4.12.0-beta.0
|
|
|
3287
3304
|
isTrusted: isTrusted
|
|
3288
3305
|
}));
|
|
3289
3306
|
};
|
|
3290
|
-
/**
|
|
3291
|
-
* This event is fired when all actions have been completed.
|
|
3292
|
-
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3293
|
-
* @event Axes#finish
|
|
3294
|
-
* @type {object}
|
|
3295
|
-
* @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>
|
|
3296
|
-
*
|
|
3297
|
-
* @example
|
|
3298
|
-
* ```js
|
|
3299
|
-
* const axes = new eg.Axes({
|
|
3300
|
-
* "x": {
|
|
3301
|
-
* range: [0, 100]
|
|
3302
|
-
* },
|
|
3303
|
-
* "zoom": {
|
|
3304
|
-
* range: [50, 30]
|
|
3305
|
-
* }
|
|
3306
|
-
* }).on("finish", function(event) {
|
|
3307
|
-
* // event.isTrusted
|
|
3308
|
-
* });
|
|
3309
|
-
* ```
|
|
3307
|
+
/**
|
|
3308
|
+
* This event is fired when all actions have been completed.
|
|
3309
|
+
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3310
|
+
* @event Axes#finish
|
|
3311
|
+
* @type {object}
|
|
3312
|
+
* @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>
|
|
3313
|
+
*
|
|
3314
|
+
* @example
|
|
3315
|
+
* ```js
|
|
3316
|
+
* const axes = new eg.Axes({
|
|
3317
|
+
* "x": {
|
|
3318
|
+
* range: [0, 100]
|
|
3319
|
+
* },
|
|
3320
|
+
* "zoom": {
|
|
3321
|
+
* range: [50, 30]
|
|
3322
|
+
* }
|
|
3323
|
+
* }).on("finish", function(event) {
|
|
3324
|
+
* // event.isTrusted
|
|
3325
|
+
* });
|
|
3326
|
+
* ```
|
|
3310
3327
|
*/
|
|
3311
3328
|
__proto.triggerFinish = function (isTrusted) {
|
|
3312
3329
|
if (isTrusted === void 0) {
|
|
@@ -3388,9 +3405,9 @@ version: 4.12.0-beta.0
|
|
|
3388
3405
|
return InterruptManager;
|
|
3389
3406
|
}();
|
|
3390
3407
|
|
|
3391
|
-
/*
|
|
3392
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
3393
|
-
* egjs projects are licensed under the MIT license
|
|
3408
|
+
/*
|
|
3409
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
3410
|
+
* egjs projects are licensed under the MIT license
|
|
3394
3411
|
*/
|
|
3395
3412
|
var getInsidePosition = function (destPos, range, circular, bounce) {
|
|
3396
3413
|
var toDestPos = destPos;
|
|
@@ -3519,9 +3536,9 @@ version: 4.12.0-beta.0
|
|
|
3519
3536
|
});
|
|
3520
3537
|
this._complementOptions();
|
|
3521
3538
|
};
|
|
3522
|
-
/**
|
|
3523
|
-
* set up 'css' expression
|
|
3524
|
-
* @private
|
|
3539
|
+
/**
|
|
3540
|
+
* set up 'css' expression
|
|
3541
|
+
* @private
|
|
3525
3542
|
*/
|
|
3526
3543
|
__proto._complementOptions = function () {
|
|
3527
3544
|
var _this = this;
|
|
@@ -4417,15 +4434,15 @@ version: 4.12.0-beta.0
|
|
|
4417
4434
|
complete();
|
|
4418
4435
|
}
|
|
4419
4436
|
};
|
|
4420
|
-
/**
|
|
4421
|
-
* Get estimated final value.
|
|
4422
|
-
*
|
|
4423
|
-
* If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
|
|
4424
|
-
* - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
|
|
4425
|
-
* 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.
|
|
4426
|
-
* - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
|
|
4427
|
-
* @param originalIntendedPos
|
|
4428
|
-
* @param destPos
|
|
4437
|
+
/**
|
|
4438
|
+
* Get estimated final value.
|
|
4439
|
+
*
|
|
4440
|
+
* If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
|
|
4441
|
+
* - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
|
|
4442
|
+
* 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.
|
|
4443
|
+
* - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
|
|
4444
|
+
* @param originalIntendedPos
|
|
4445
|
+
* @param destPos
|
|
4429
4446
|
*/
|
|
4430
4447
|
__proto._getFinalPos = function (destPos, originalIntendedPos) {
|
|
4431
4448
|
var _this = this;
|
|
@@ -4551,111 +4568,111 @@ version: 4.12.0-beta.0
|
|
|
4551
4568
|
return EasingManager;
|
|
4552
4569
|
}(AnimationManager);
|
|
4553
4570
|
|
|
4554
|
-
/**
|
|
4555
|
-
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4556
|
-
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4557
|
-
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4558
|
-
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4559
|
-
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4560
|
-
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4561
|
-
* @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>
|
|
4562
|
-
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4563
|
-
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
4564
|
-
* @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>
|
|
4565
|
-
* @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
|
|
4566
|
-
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
|
|
4571
|
+
/**
|
|
4572
|
+
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4573
|
+
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4574
|
+
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4575
|
+
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4576
|
+
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4577
|
+
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4578
|
+
* @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>
|
|
4579
|
+
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4580
|
+
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
4581
|
+
* @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>
|
|
4582
|
+
* @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
|
|
4583
|
+
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
|
|
4567
4584
|
**/
|
|
4568
|
-
/**
|
|
4569
|
-
* @typedef {Object} AxesOption The option object of the eg.Axes module
|
|
4570
|
-
* @ko eg.Axes 모듈의 옵션 객체
|
|
4571
|
-
* @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
|
|
4572
|
-
* @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
|
|
4573
|
-
* @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
|
|
4574
|
-
* @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>
|
|
4575
|
-
* @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
|
|
4576
|
-
* - true: It can be paused or stopped by user action or the API.
|
|
4577
|
-
* - false: It cannot be paused or stopped by user action or the API while it is running.
|
|
4578
|
-
* <ko>진행 중인 애니메이션 중지 가능 여부.
|
|
4579
|
-
* - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
|
|
4580
|
-
* - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
|
|
4581
|
-
* @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)
|
|
4582
|
-
* [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
|
|
4583
|
-
* [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
|
|
4584
|
-
* @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
|
|
4585
|
+
/**
|
|
4586
|
+
* @typedef {Object} AxesOption The option object of the eg.Axes module
|
|
4587
|
+
* @ko eg.Axes 모듈의 옵션 객체
|
|
4588
|
+
* @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
|
|
4589
|
+
* @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
|
|
4590
|
+
* @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
|
|
4591
|
+
* @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>
|
|
4592
|
+
* @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
|
|
4593
|
+
* - true: It can be paused or stopped by user action or the API.
|
|
4594
|
+
* - false: It cannot be paused or stopped by user action or the API while it is running.
|
|
4595
|
+
* <ko>진행 중인 애니메이션 중지 가능 여부.
|
|
4596
|
+
* - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
|
|
4597
|
+
* - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
|
|
4598
|
+
* @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)
|
|
4599
|
+
* [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
|
|
4600
|
+
* [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
|
|
4601
|
+
* @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
|
|
4585
4602
|
**/
|
|
4586
|
-
/**
|
|
4587
|
-
* 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.
|
|
4588
|
-
* @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
|
|
4589
|
-
* @extends eg.Component
|
|
4590
|
-
*
|
|
4591
|
-
* @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>
|
|
4592
|
-
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4593
|
-
* @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>
|
|
4594
|
-
*
|
|
4595
|
-
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4596
|
-
* @example
|
|
4597
|
-
* ```js
|
|
4598
|
-
* // 1. Initialize eg.Axes
|
|
4599
|
-
* const axes = new eg.Axes({
|
|
4600
|
-
* something1: {
|
|
4601
|
-
* range: [0, 150],
|
|
4602
|
-
* bounce: 50
|
|
4603
|
-
* },
|
|
4604
|
-
* something2: {
|
|
4605
|
-
* range: [0, 200],
|
|
4606
|
-
* bounce: 100
|
|
4607
|
-
* },
|
|
4608
|
-
* somethingN: {
|
|
4609
|
-
* range: [1, 10],
|
|
4610
|
-
* }
|
|
4611
|
-
* }, {
|
|
4612
|
-
* deceleration : 0.0024
|
|
4613
|
-
* });
|
|
4614
|
-
*
|
|
4615
|
-
* // 2. attach event handler
|
|
4616
|
-
* axes.on({
|
|
4617
|
-
* "hold" : function(evt) {
|
|
4618
|
-
* },
|
|
4619
|
-
* "release" : function(evt) {
|
|
4620
|
-
* },
|
|
4621
|
-
* "animationStart" : function(evt) {
|
|
4622
|
-
* },
|
|
4623
|
-
* "animationEnd" : function(evt) {
|
|
4624
|
-
* },
|
|
4625
|
-
* "change" : function(evt) {
|
|
4626
|
-
* }
|
|
4627
|
-
* });
|
|
4628
|
-
*
|
|
4629
|
-
* // 3. Initialize inputTypes
|
|
4630
|
-
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4631
|
-
* scale: [0.5, 1]
|
|
4632
|
-
* });
|
|
4633
|
-
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4634
|
-
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4635
|
-
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4636
|
-
* scale: 1.5
|
|
4637
|
-
* });
|
|
4638
|
-
*
|
|
4639
|
-
* // 4. Connect eg.Axes and InputTypes
|
|
4640
|
-
* // [PanInput] When the mouse or touchscreen is down and moved.
|
|
4641
|
-
* // Connect the 'something2' axis to the mouse or touchscreen x position and
|
|
4642
|
-
* // connect the 'somethingN' axis to the mouse or touchscreen y position.
|
|
4643
|
-
* axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
|
|
4644
|
-
*
|
|
4645
|
-
* // Connect only one 'something1' axis to the mouse or touchscreen x position.
|
|
4646
|
-
* axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
|
|
4647
|
-
*
|
|
4648
|
-
* // Connect only one 'something2' axis to the mouse or touchscreen y position.
|
|
4649
|
-
* axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
|
|
4650
|
-
*
|
|
4651
|
-
* // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
|
|
4652
|
-
* axes.connect("something2", pinchInputArea);
|
|
4653
|
-
* ```
|
|
4603
|
+
/**
|
|
4604
|
+
* 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.
|
|
4605
|
+
* @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
|
|
4606
|
+
* @extends eg.Component
|
|
4607
|
+
*
|
|
4608
|
+
* @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>
|
|
4609
|
+
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4610
|
+
* @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>
|
|
4611
|
+
*
|
|
4612
|
+
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4613
|
+
* @example
|
|
4614
|
+
* ```js
|
|
4615
|
+
* // 1. Initialize eg.Axes
|
|
4616
|
+
* const axes = new eg.Axes({
|
|
4617
|
+
* something1: {
|
|
4618
|
+
* range: [0, 150],
|
|
4619
|
+
* bounce: 50
|
|
4620
|
+
* },
|
|
4621
|
+
* something2: {
|
|
4622
|
+
* range: [0, 200],
|
|
4623
|
+
* bounce: 100
|
|
4624
|
+
* },
|
|
4625
|
+
* somethingN: {
|
|
4626
|
+
* range: [1, 10],
|
|
4627
|
+
* }
|
|
4628
|
+
* }, {
|
|
4629
|
+
* deceleration : 0.0024
|
|
4630
|
+
* });
|
|
4631
|
+
*
|
|
4632
|
+
* // 2. attach event handler
|
|
4633
|
+
* axes.on({
|
|
4634
|
+
* "hold" : function(evt) {
|
|
4635
|
+
* },
|
|
4636
|
+
* "release" : function(evt) {
|
|
4637
|
+
* },
|
|
4638
|
+
* "animationStart" : function(evt) {
|
|
4639
|
+
* },
|
|
4640
|
+
* "animationEnd" : function(evt) {
|
|
4641
|
+
* },
|
|
4642
|
+
* "change" : function(evt) {
|
|
4643
|
+
* }
|
|
4644
|
+
* });
|
|
4645
|
+
*
|
|
4646
|
+
* // 3. Initialize inputTypes
|
|
4647
|
+
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4648
|
+
* scale: [0.5, 1]
|
|
4649
|
+
* });
|
|
4650
|
+
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4651
|
+
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4652
|
+
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4653
|
+
* scale: 1.5
|
|
4654
|
+
* });
|
|
4655
|
+
*
|
|
4656
|
+
* // 4. Connect eg.Axes and InputTypes
|
|
4657
|
+
* // [PanInput] When the mouse or touchscreen is down and moved.
|
|
4658
|
+
* // Connect the 'something2' axis to the mouse or touchscreen x position and
|
|
4659
|
+
* // connect the 'somethingN' axis to the mouse or touchscreen y position.
|
|
4660
|
+
* axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
|
|
4661
|
+
*
|
|
4662
|
+
* // Connect only one 'something1' axis to the mouse or touchscreen x position.
|
|
4663
|
+
* axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
|
|
4664
|
+
*
|
|
4665
|
+
* // Connect only one 'something2' axis to the mouse or touchscreen y position.
|
|
4666
|
+
* axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
|
|
4667
|
+
*
|
|
4668
|
+
* // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
|
|
4669
|
+
* axes.connect("something2", pinchInputArea);
|
|
4670
|
+
* ```
|
|
4654
4671
|
*/
|
|
4655
4672
|
var Axes = /*#__PURE__*/function (_super) {
|
|
4656
4673
|
__extends$1(Axes, _super);
|
|
4657
|
-
/**
|
|
4658
|
-
*
|
|
4674
|
+
/**
|
|
4675
|
+
*
|
|
4659
4676
|
*/
|
|
4660
4677
|
function Axes(axis, options, startPos) {
|
|
4661
4678
|
if (axis === void 0) {
|
|
@@ -4695,23 +4712,23 @@ version: 4.12.0-beta.0
|
|
|
4695
4712
|
}
|
|
4696
4713
|
var __proto = Axes.prototype;
|
|
4697
4714
|
Object.defineProperty(__proto, "holding", {
|
|
4698
|
-
/**
|
|
4699
|
-
* @name Axes#holding
|
|
4700
|
-
* @desc Returns true if at least one input is in progress.
|
|
4701
|
-
* @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
|
|
4702
|
-
*
|
|
4703
|
-
* @readonly
|
|
4704
|
-
* @type {boolean}
|
|
4705
|
-
* @example
|
|
4706
|
-
* ```js
|
|
4707
|
-
* const axes = new eg.Axes({
|
|
4708
|
-
* x: {
|
|
4709
|
-
* range: [0, 100],
|
|
4710
|
-
* },
|
|
4711
|
-
* });
|
|
4712
|
-
*
|
|
4713
|
-
* axes.holding
|
|
4714
|
-
* ```
|
|
4715
|
+
/**
|
|
4716
|
+
* @name Axes#holding
|
|
4717
|
+
* @desc Returns true if at least one input is in progress.
|
|
4718
|
+
* @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
|
|
4719
|
+
*
|
|
4720
|
+
* @readonly
|
|
4721
|
+
* @type {boolean}
|
|
4722
|
+
* @example
|
|
4723
|
+
* ```js
|
|
4724
|
+
* const axes = new eg.Axes({
|
|
4725
|
+
* x: {
|
|
4726
|
+
* range: [0, 100],
|
|
4727
|
+
* },
|
|
4728
|
+
* });
|
|
4729
|
+
*
|
|
4730
|
+
* axes.holding
|
|
4731
|
+
* ```
|
|
4715
4732
|
*/
|
|
4716
4733
|
get: function () {
|
|
4717
4734
|
return this.eventManager.holdingCount > 0;
|
|
@@ -4719,30 +4736,30 @@ version: 4.12.0-beta.0
|
|
|
4719
4736
|
enumerable: false,
|
|
4720
4737
|
configurable: true
|
|
4721
4738
|
});
|
|
4722
|
-
/**
|
|
4723
|
-
* Connect the axis of eg.Axes to the inputType.
|
|
4724
|
-
* @ko eg.Axes의 축과 inputType을 연결한다
|
|
4725
|
-
* @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
|
|
4726
|
-
* @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
|
|
4727
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4728
|
-
* @example
|
|
4729
|
-
* ```js
|
|
4730
|
-
* const axes = new eg.Axes({
|
|
4731
|
-
* "x": {
|
|
4732
|
-
* range: [0, 100]
|
|
4733
|
-
* },
|
|
4734
|
-
* "xOther": {
|
|
4735
|
-
* range: [-100, 100]
|
|
4736
|
-
* }
|
|
4737
|
-
* });
|
|
4738
|
-
*
|
|
4739
|
-
* axes.connect("x", new eg.Axes.PanInput("#area1"))
|
|
4740
|
-
* .connect("x xOther", new eg.Axes.PanInput("#area2"))
|
|
4741
|
-
* .connect(" xOther", new eg.Axes.PanInput("#area3"))
|
|
4742
|
-
* .connect(["x"], new eg.Axes.PanInput("#area4"))
|
|
4743
|
-
* .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
|
|
4744
|
-
* .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
|
|
4745
|
-
* ```
|
|
4739
|
+
/**
|
|
4740
|
+
* Connect the axis of eg.Axes to the inputType.
|
|
4741
|
+
* @ko eg.Axes의 축과 inputType을 연결한다
|
|
4742
|
+
* @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
|
|
4743
|
+
* @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
|
|
4744
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4745
|
+
* @example
|
|
4746
|
+
* ```js
|
|
4747
|
+
* const axes = new eg.Axes({
|
|
4748
|
+
* "x": {
|
|
4749
|
+
* range: [0, 100]
|
|
4750
|
+
* },
|
|
4751
|
+
* "xOther": {
|
|
4752
|
+
* range: [-100, 100]
|
|
4753
|
+
* }
|
|
4754
|
+
* });
|
|
4755
|
+
*
|
|
4756
|
+
* axes.connect("x", new eg.Axes.PanInput("#area1"))
|
|
4757
|
+
* .connect("x xOther", new eg.Axes.PanInput("#area2"))
|
|
4758
|
+
* .connect(" xOther", new eg.Axes.PanInput("#area3"))
|
|
4759
|
+
* .connect(["x"], new eg.Axes.PanInput("#area4"))
|
|
4760
|
+
* .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
|
|
4761
|
+
* .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
|
|
4762
|
+
* ```
|
|
4746
4763
|
*/
|
|
4747
4764
|
__proto.connect = function (axes, inputType) {
|
|
4748
4765
|
var mapped;
|
|
@@ -4760,33 +4777,33 @@ version: 4.12.0-beta.0
|
|
|
4760
4777
|
this._inputs.push(inputType);
|
|
4761
4778
|
return this;
|
|
4762
4779
|
};
|
|
4763
|
-
/**
|
|
4764
|
-
* Disconnect the axis of eg.Axes from the inputType.
|
|
4765
|
-
* @ko eg.Axes의 축과 inputType의 연결을 끊는다.
|
|
4766
|
-
* @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
|
|
4767
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4768
|
-
* @example
|
|
4769
|
-
* ```js
|
|
4770
|
-
* const axes = new eg.Axes({
|
|
4771
|
-
* "x": {
|
|
4772
|
-
* range: [0, 100]
|
|
4773
|
-
* },
|
|
4774
|
-
* "xOther": {
|
|
4775
|
-
* range: [-100, 100]
|
|
4776
|
-
* }
|
|
4777
|
-
* });
|
|
4778
|
-
*
|
|
4779
|
-
* const input1 = new eg.Axes.PanInput("#area1");
|
|
4780
|
-
* const input2 = new eg.Axes.PanInput("#area2");
|
|
4781
|
-
* const input3 = new eg.Axes.PanInput("#area3");
|
|
4782
|
-
*
|
|
4783
|
-
* axes.connect("x", input1);
|
|
4784
|
-
* .connect("x xOther", input2)
|
|
4785
|
-
* .connect(["xOther", "x"], input3);
|
|
4786
|
-
*
|
|
4787
|
-
* axes.disconnect(input1); // disconnects input1
|
|
4788
|
-
* axes.disconnect(); // disconnects all of them
|
|
4789
|
-
* ```
|
|
4780
|
+
/**
|
|
4781
|
+
* Disconnect the axis of eg.Axes from the inputType.
|
|
4782
|
+
* @ko eg.Axes의 축과 inputType의 연결을 끊는다.
|
|
4783
|
+
* @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
|
|
4784
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4785
|
+
* @example
|
|
4786
|
+
* ```js
|
|
4787
|
+
* const axes = new eg.Axes({
|
|
4788
|
+
* "x": {
|
|
4789
|
+
* range: [0, 100]
|
|
4790
|
+
* },
|
|
4791
|
+
* "xOther": {
|
|
4792
|
+
* range: [-100, 100]
|
|
4793
|
+
* }
|
|
4794
|
+
* });
|
|
4795
|
+
*
|
|
4796
|
+
* const input1 = new eg.Axes.PanInput("#area1");
|
|
4797
|
+
* const input2 = new eg.Axes.PanInput("#area2");
|
|
4798
|
+
* const input3 = new eg.Axes.PanInput("#area3");
|
|
4799
|
+
*
|
|
4800
|
+
* axes.connect("x", input1);
|
|
4801
|
+
* .connect("x xOther", input2)
|
|
4802
|
+
* .connect(["xOther", "x"], input3);
|
|
4803
|
+
*
|
|
4804
|
+
* axes.disconnect(input1); // disconnects input1
|
|
4805
|
+
* axes.disconnect(); // disconnects all of them
|
|
4806
|
+
* ```
|
|
4790
4807
|
*/
|
|
4791
4808
|
__proto.disconnect = function (inputType) {
|
|
4792
4809
|
if (inputType) {
|
|
@@ -4803,60 +4820,60 @@ version: 4.12.0-beta.0
|
|
|
4803
4820
|
}
|
|
4804
4821
|
return this;
|
|
4805
4822
|
};
|
|
4806
|
-
/**
|
|
4807
|
-
* Returns the current position of the coordinates.
|
|
4808
|
-
* @ko 좌표의 현재 위치를 반환한다
|
|
4809
|
-
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
4810
|
-
* @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
|
|
4811
|
-
* @example
|
|
4812
|
-
* ```js
|
|
4813
|
-
* const axes = new eg.Axes({
|
|
4814
|
-
* "x": {
|
|
4815
|
-
* range: [0, 100]
|
|
4816
|
-
* },
|
|
4817
|
-
* "xOther": {
|
|
4818
|
-
* range: [-100, 100]
|
|
4819
|
-
* },
|
|
4820
|
-
* "zoom": {
|
|
4821
|
-
* range: [50, 30]
|
|
4822
|
-
* }
|
|
4823
|
-
* });
|
|
4824
|
-
*
|
|
4825
|
-
* axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
|
|
4826
|
-
* axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
|
|
4827
|
-
* ```
|
|
4823
|
+
/**
|
|
4824
|
+
* Returns the current position of the coordinates.
|
|
4825
|
+
* @ko 좌표의 현재 위치를 반환한다
|
|
4826
|
+
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
4827
|
+
* @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
|
|
4828
|
+
* @example
|
|
4829
|
+
* ```js
|
|
4830
|
+
* const axes = new eg.Axes({
|
|
4831
|
+
* "x": {
|
|
4832
|
+
* range: [0, 100]
|
|
4833
|
+
* },
|
|
4834
|
+
* "xOther": {
|
|
4835
|
+
* range: [-100, 100]
|
|
4836
|
+
* },
|
|
4837
|
+
* "zoom": {
|
|
4838
|
+
* range: [50, 30]
|
|
4839
|
+
* }
|
|
4840
|
+
* });
|
|
4841
|
+
*
|
|
4842
|
+
* axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
|
|
4843
|
+
* axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
|
|
4844
|
+
* ```
|
|
4828
4845
|
*/
|
|
4829
4846
|
__proto.get = function (axes) {
|
|
4830
4847
|
return this.axisManager.get(axes);
|
|
4831
4848
|
};
|
|
4832
|
-
/**
|
|
4833
|
-
* Moves an axis to specific coordinates.
|
|
4834
|
-
* @ko 좌표를 이동한다.
|
|
4835
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4836
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4837
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4838
|
-
* @example
|
|
4839
|
-
* ```js
|
|
4840
|
-
* const axes = new eg.Axes({
|
|
4841
|
-
* "x": {
|
|
4842
|
-
* range: [0, 100]
|
|
4843
|
-
* },
|
|
4844
|
-
* "xOther": {
|
|
4845
|
-
* range: [-100, 100]
|
|
4846
|
-
* },
|
|
4847
|
-
* "zoom": {
|
|
4848
|
-
* range: [50, 30]
|
|
4849
|
-
* }
|
|
4850
|
-
* });
|
|
4851
|
-
*
|
|
4852
|
-
* axes.setTo({"x": 30, "zoom": 60});
|
|
4853
|
-
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4854
|
-
*
|
|
4855
|
-
* axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
|
|
4856
|
-
*
|
|
4857
|
-
* // after 1000 ms
|
|
4858
|
-
* axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
|
|
4859
|
-
* ```
|
|
4849
|
+
/**
|
|
4850
|
+
* Moves an axis to specific coordinates.
|
|
4851
|
+
* @ko 좌표를 이동한다.
|
|
4852
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4853
|
+
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4854
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4855
|
+
* @example
|
|
4856
|
+
* ```js
|
|
4857
|
+
* const axes = new eg.Axes({
|
|
4858
|
+
* "x": {
|
|
4859
|
+
* range: [0, 100]
|
|
4860
|
+
* },
|
|
4861
|
+
* "xOther": {
|
|
4862
|
+
* range: [-100, 100]
|
|
4863
|
+
* },
|
|
4864
|
+
* "zoom": {
|
|
4865
|
+
* range: [50, 30]
|
|
4866
|
+
* }
|
|
4867
|
+
* });
|
|
4868
|
+
*
|
|
4869
|
+
* axes.setTo({"x": 30, "zoom": 60});
|
|
4870
|
+
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4871
|
+
*
|
|
4872
|
+
* axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
|
|
4873
|
+
*
|
|
4874
|
+
* // after 1000 ms
|
|
4875
|
+
* axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
|
|
4876
|
+
* ```
|
|
4860
4877
|
*/
|
|
4861
4878
|
__proto.setTo = function (pos, duration) {
|
|
4862
4879
|
if (duration === void 0) {
|
|
@@ -4865,34 +4882,34 @@ version: 4.12.0-beta.0
|
|
|
4865
4882
|
this.animationManager.setTo(pos, duration);
|
|
4866
4883
|
return this;
|
|
4867
4884
|
};
|
|
4868
|
-
/**
|
|
4869
|
-
* Moves an axis from the current coordinates to specific coordinates.
|
|
4870
|
-
* @ko 현재 좌표를 기준으로 좌표를 이동한다.
|
|
4871
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4872
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4873
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4874
|
-
* @example
|
|
4875
|
-
* ```js
|
|
4876
|
-
* const axes = new eg.Axes({
|
|
4877
|
-
* "x": {
|
|
4878
|
-
* range: [0, 100]
|
|
4879
|
-
* },
|
|
4880
|
-
* "xOther": {
|
|
4881
|
-
* range: [-100, 100]
|
|
4882
|
-
* },
|
|
4883
|
-
* "zoom": {
|
|
4884
|
-
* range: [50, 30]
|
|
4885
|
-
* }
|
|
4886
|
-
* });
|
|
4887
|
-
*
|
|
4888
|
-
* axes.setBy({"x": 30, "zoom": 10});
|
|
4889
|
-
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4890
|
-
*
|
|
4891
|
-
* axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
|
|
4892
|
-
*
|
|
4893
|
-
* // after 1000 ms
|
|
4894
|
-
* axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
|
|
4895
|
-
* ```
|
|
4885
|
+
/**
|
|
4886
|
+
* Moves an axis from the current coordinates to specific coordinates.
|
|
4887
|
+
* @ko 현재 좌표를 기준으로 좌표를 이동한다.
|
|
4888
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4889
|
+
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4890
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4891
|
+
* @example
|
|
4892
|
+
* ```js
|
|
4893
|
+
* const axes = new eg.Axes({
|
|
4894
|
+
* "x": {
|
|
4895
|
+
* range: [0, 100]
|
|
4896
|
+
* },
|
|
4897
|
+
* "xOther": {
|
|
4898
|
+
* range: [-100, 100]
|
|
4899
|
+
* },
|
|
4900
|
+
* "zoom": {
|
|
4901
|
+
* range: [50, 30]
|
|
4902
|
+
* }
|
|
4903
|
+
* });
|
|
4904
|
+
*
|
|
4905
|
+
* axes.setBy({"x": 30, "zoom": 10});
|
|
4906
|
+
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4907
|
+
*
|
|
4908
|
+
* axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
|
|
4909
|
+
*
|
|
4910
|
+
* // after 1000 ms
|
|
4911
|
+
* axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
|
|
4912
|
+
* ```
|
|
4896
4913
|
*/
|
|
4897
4914
|
__proto.setBy = function (pos, duration) {
|
|
4898
4915
|
if (duration === void 0) {
|
|
@@ -4901,230 +4918,230 @@ version: 4.12.0-beta.0
|
|
|
4901
4918
|
this.animationManager.setBy(pos, duration);
|
|
4902
4919
|
return this;
|
|
4903
4920
|
};
|
|
4904
|
-
/**
|
|
4905
|
-
* Change the options of Axes instance.
|
|
4906
|
-
* @ko 인스턴스의 옵션을 변경한다.
|
|
4907
|
-
* @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
|
|
4908
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4909
|
-
* @example
|
|
4910
|
-
* ```js
|
|
4911
|
-
* const axes = new eg.Axes({
|
|
4912
|
-
* "x": {
|
|
4913
|
-
* range: [0, 100]
|
|
4914
|
-
* },
|
|
4915
|
-
* }, {
|
|
4916
|
-
* round: 10,
|
|
4917
|
-
* });
|
|
4918
|
-
*
|
|
4919
|
-
* axes.setTo({"x": 48});
|
|
4920
|
-
* axes.get(); // {"x": 50}
|
|
4921
|
-
*
|
|
4922
|
-
* axes.setOptions({
|
|
4923
|
-
* round: 1,
|
|
4924
|
-
* });
|
|
4925
|
-
*
|
|
4926
|
-
* axes.setTo({"x": 48});
|
|
4927
|
-
* axes.get(); // {"x": 48}
|
|
4928
|
-
* ```
|
|
4921
|
+
/**
|
|
4922
|
+
* Change the options of Axes instance.
|
|
4923
|
+
* @ko 인스턴스의 옵션을 변경한다.
|
|
4924
|
+
* @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
|
|
4925
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4926
|
+
* @example
|
|
4927
|
+
* ```js
|
|
4928
|
+
* const axes = new eg.Axes({
|
|
4929
|
+
* "x": {
|
|
4930
|
+
* range: [0, 100]
|
|
4931
|
+
* },
|
|
4932
|
+
* }, {
|
|
4933
|
+
* round: 10,
|
|
4934
|
+
* });
|
|
4935
|
+
*
|
|
4936
|
+
* axes.setTo({"x": 48});
|
|
4937
|
+
* axes.get(); // {"x": 50}
|
|
4938
|
+
*
|
|
4939
|
+
* axes.setOptions({
|
|
4940
|
+
* round: 1,
|
|
4941
|
+
* });
|
|
4942
|
+
*
|
|
4943
|
+
* axes.setTo({"x": 48});
|
|
4944
|
+
* axes.get(); // {"x": 48}
|
|
4945
|
+
* ```
|
|
4929
4946
|
*/
|
|
4930
4947
|
__proto.setOptions = function (options) {
|
|
4931
4948
|
this.options = __assign$1(__assign$1({}, this.options), options);
|
|
4932
4949
|
this.animationManager.setOptions(options);
|
|
4933
4950
|
return this;
|
|
4934
4951
|
};
|
|
4935
|
-
/**
|
|
4936
|
-
* Change the information of an existing axis.
|
|
4937
|
-
* @ko 존재하는 축의 정보를 변경한다.
|
|
4938
|
-
* @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
|
|
4939
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4940
|
-
* @example
|
|
4941
|
-
* ```js
|
|
4942
|
-
* const axes = new eg.Axes({
|
|
4943
|
-
* "x": {
|
|
4944
|
-
* range: [0, 100]
|
|
4945
|
-
* },
|
|
4946
|
-
* });
|
|
4947
|
-
*
|
|
4948
|
-
* axes.setTo({"x": 150});
|
|
4949
|
-
* axes.get(); // {"x": 100}
|
|
4950
|
-
*
|
|
4951
|
-
* axes.setAxis({
|
|
4952
|
-
* "x": {
|
|
4953
|
-
* range: [0, 200]
|
|
4954
|
-
* },
|
|
4955
|
-
* });
|
|
4956
|
-
*
|
|
4957
|
-
* axes.setTo({"x": 150});
|
|
4958
|
-
* axes.get(); // {"x": 150}
|
|
4959
|
-
* ```
|
|
4952
|
+
/**
|
|
4953
|
+
* Change the information of an existing axis.
|
|
4954
|
+
* @ko 존재하는 축의 정보를 변경한다.
|
|
4955
|
+
* @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
|
|
4956
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4957
|
+
* @example
|
|
4958
|
+
* ```js
|
|
4959
|
+
* const axes = new eg.Axes({
|
|
4960
|
+
* "x": {
|
|
4961
|
+
* range: [0, 100]
|
|
4962
|
+
* },
|
|
4963
|
+
* });
|
|
4964
|
+
*
|
|
4965
|
+
* axes.setTo({"x": 150});
|
|
4966
|
+
* axes.get(); // {"x": 100}
|
|
4967
|
+
*
|
|
4968
|
+
* axes.setAxis({
|
|
4969
|
+
* "x": {
|
|
4970
|
+
* range: [0, 200]
|
|
4971
|
+
* },
|
|
4972
|
+
* });
|
|
4973
|
+
*
|
|
4974
|
+
* axes.setTo({"x": 150});
|
|
4975
|
+
* axes.get(); // {"x": 150}
|
|
4976
|
+
* ```
|
|
4960
4977
|
*/
|
|
4961
4978
|
__proto.setAxis = function (axis) {
|
|
4962
4979
|
this.axisManager.setAxis(axis);
|
|
4963
4980
|
return this;
|
|
4964
4981
|
};
|
|
4965
|
-
/**
|
|
4966
|
-
* Stop an animation in progress.
|
|
4967
|
-
* @ko 재생 중인 애니메이션을 정지한다.
|
|
4968
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4969
|
-
* @example
|
|
4970
|
-
* ```js
|
|
4971
|
-
* const axes = new eg.Axes({
|
|
4972
|
-
* "x": {
|
|
4973
|
-
* range: [0, 100]
|
|
4974
|
-
* },
|
|
4975
|
-
* });
|
|
4976
|
-
*
|
|
4977
|
-
* axes.setTo({"x": 10}, 1000); // start animatation
|
|
4978
|
-
*
|
|
4979
|
-
* // after 500 ms
|
|
4980
|
-
* axes.stopAnimation(); // stop animation during movement.
|
|
4981
|
-
* ```
|
|
4982
|
+
/**
|
|
4983
|
+
* Stop an animation in progress.
|
|
4984
|
+
* @ko 재생 중인 애니메이션을 정지한다.
|
|
4985
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4986
|
+
* @example
|
|
4987
|
+
* ```js
|
|
4988
|
+
* const axes = new eg.Axes({
|
|
4989
|
+
* "x": {
|
|
4990
|
+
* range: [0, 100]
|
|
4991
|
+
* },
|
|
4992
|
+
* });
|
|
4993
|
+
*
|
|
4994
|
+
* axes.setTo({"x": 10}, 1000); // start animatation
|
|
4995
|
+
*
|
|
4996
|
+
* // after 500 ms
|
|
4997
|
+
* axes.stopAnimation(); // stop animation during movement.
|
|
4998
|
+
* ```
|
|
4982
4999
|
*/
|
|
4983
5000
|
__proto.stopAnimation = function () {
|
|
4984
5001
|
this.animationManager.stopAnimation();
|
|
4985
5002
|
this.animationManager.finish(false);
|
|
4986
5003
|
return this;
|
|
4987
5004
|
};
|
|
4988
|
-
/**
|
|
4989
|
-
* Change the destination of an animation in progress.
|
|
4990
|
-
* @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
|
|
4991
|
-
* @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4992
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4993
|
-
* @example
|
|
4994
|
-
* ```js
|
|
4995
|
-
* const axes = new eg.Axes({
|
|
4996
|
-
* "x": {
|
|
4997
|
-
* range: [0, 200]
|
|
4998
|
-
* },
|
|
4999
|
-
* "y": {
|
|
5000
|
-
* range: [0, 200]
|
|
5001
|
-
* }
|
|
5002
|
-
* });
|
|
5003
|
-
*
|
|
5004
|
-
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5005
|
-
*
|
|
5006
|
-
* // after 500 ms
|
|
5007
|
-
* axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
|
|
5008
|
-
*
|
|
5009
|
-
* // after 500 ms
|
|
5010
|
-
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5011
|
-
*
|
|
5012
|
-
* // after 700 ms
|
|
5013
|
-
* 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.
|
|
5014
|
-
* ```
|
|
5005
|
+
/**
|
|
5006
|
+
* Change the destination of an animation in progress.
|
|
5007
|
+
* @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
|
|
5008
|
+
* @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
5009
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5010
|
+
* @example
|
|
5011
|
+
* ```js
|
|
5012
|
+
* const axes = new eg.Axes({
|
|
5013
|
+
* "x": {
|
|
5014
|
+
* range: [0, 200]
|
|
5015
|
+
* },
|
|
5016
|
+
* "y": {
|
|
5017
|
+
* range: [0, 200]
|
|
5018
|
+
* }
|
|
5019
|
+
* });
|
|
5020
|
+
*
|
|
5021
|
+
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5022
|
+
*
|
|
5023
|
+
* // after 500 ms
|
|
5024
|
+
* axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
|
|
5025
|
+
*
|
|
5026
|
+
* // after 500 ms
|
|
5027
|
+
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5028
|
+
*
|
|
5029
|
+
* // after 700 ms
|
|
5030
|
+
* 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.
|
|
5031
|
+
* ```
|
|
5015
5032
|
*/
|
|
5016
5033
|
__proto.updateAnimation = function (options) {
|
|
5017
5034
|
this.animationManager.updateAnimation(options);
|
|
5018
5035
|
return this;
|
|
5019
5036
|
};
|
|
5020
|
-
/**
|
|
5021
|
-
* Returns whether there is a coordinate in the bounce area of the target axis.
|
|
5022
|
-
* @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
|
|
5023
|
-
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
5024
|
-
* @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
|
|
5025
|
-
* @example
|
|
5026
|
-
* ```js
|
|
5027
|
-
* const axes = new eg.Axes({
|
|
5028
|
-
* "x": {
|
|
5029
|
-
* range: [0, 100]
|
|
5030
|
-
* },
|
|
5031
|
-
* "xOther": {
|
|
5032
|
-
* range: [-100, 100]
|
|
5033
|
-
* },
|
|
5034
|
-
* "zoom": {
|
|
5035
|
-
* range: [50, 30]
|
|
5036
|
-
* }
|
|
5037
|
-
* });
|
|
5038
|
-
*
|
|
5039
|
-
* axes.isBounceArea(["x"]);
|
|
5040
|
-
* axes.isBounceArea(["x", "zoom"]);
|
|
5041
|
-
* axes.isBounceArea();
|
|
5042
|
-
* ```
|
|
5037
|
+
/**
|
|
5038
|
+
* Returns whether there is a coordinate in the bounce area of the target axis.
|
|
5039
|
+
* @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
|
|
5040
|
+
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
5041
|
+
* @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
|
|
5042
|
+
* @example
|
|
5043
|
+
* ```js
|
|
5044
|
+
* const axes = new eg.Axes({
|
|
5045
|
+
* "x": {
|
|
5046
|
+
* range: [0, 100]
|
|
5047
|
+
* },
|
|
5048
|
+
* "xOther": {
|
|
5049
|
+
* range: [-100, 100]
|
|
5050
|
+
* },
|
|
5051
|
+
* "zoom": {
|
|
5052
|
+
* range: [50, 30]
|
|
5053
|
+
* }
|
|
5054
|
+
* });
|
|
5055
|
+
*
|
|
5056
|
+
* axes.isBounceArea(["x"]);
|
|
5057
|
+
* axes.isBounceArea(["x", "zoom"]);
|
|
5058
|
+
* axes.isBounceArea();
|
|
5059
|
+
* ```
|
|
5043
5060
|
*/
|
|
5044
5061
|
__proto.isBounceArea = function (axes) {
|
|
5045
5062
|
return this.axisManager.isOutside(axes);
|
|
5046
5063
|
};
|
|
5047
|
-
/**
|
|
5048
|
-
* Destroys properties, and events used in a module and disconnect all connections to inputTypes.
|
|
5049
|
-
* @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
|
|
5064
|
+
/**
|
|
5065
|
+
* Destroys properties, and events used in a module and disconnect all connections to inputTypes.
|
|
5066
|
+
* @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
|
|
5050
5067
|
*/
|
|
5051
5068
|
__proto.destroy = function () {
|
|
5052
5069
|
this.disconnect();
|
|
5053
5070
|
this.eventManager.destroy();
|
|
5054
5071
|
};
|
|
5055
|
-
/**
|
|
5056
|
-
* @name VERSION
|
|
5057
|
-
* @desc Version info string
|
|
5058
|
-
* @ko 버전정보 문자열
|
|
5059
|
-
*
|
|
5060
|
-
* @constant
|
|
5061
|
-
* @type {String}
|
|
5062
|
-
* @example
|
|
5063
|
-
* ```js
|
|
5064
|
-
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5065
|
-
* ```
|
|
5072
|
+
/**
|
|
5073
|
+
* @name VERSION
|
|
5074
|
+
* @desc Version info string
|
|
5075
|
+
* @ko 버전정보 문자열
|
|
5076
|
+
*
|
|
5077
|
+
* @constant
|
|
5078
|
+
* @type {String}
|
|
5079
|
+
* @example
|
|
5080
|
+
* ```js
|
|
5081
|
+
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5082
|
+
* ```
|
|
5066
5083
|
*/
|
|
5067
|
-
Axes.VERSION = "3.9.0";
|
|
5084
|
+
Axes.VERSION = "3.9.1-beta.0";
|
|
5068
5085
|
/* eslint-enable */
|
|
5069
|
-
/**
|
|
5070
|
-
* @name TRANSFORM
|
|
5071
|
-
* @desc Returns the transform attribute with CSS vendor prefixes.
|
|
5072
|
-
* @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
|
|
5073
|
-
*
|
|
5074
|
-
* @constant
|
|
5075
|
-
* @type {String}
|
|
5076
|
-
* @example
|
|
5077
|
-
* ```js
|
|
5078
|
-
* eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
|
|
5079
|
-
* ```
|
|
5086
|
+
/**
|
|
5087
|
+
* @name TRANSFORM
|
|
5088
|
+
* @desc Returns the transform attribute with CSS vendor prefixes.
|
|
5089
|
+
* @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
|
|
5090
|
+
*
|
|
5091
|
+
* @constant
|
|
5092
|
+
* @type {String}
|
|
5093
|
+
* @example
|
|
5094
|
+
* ```js
|
|
5095
|
+
* eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
|
|
5096
|
+
* ```
|
|
5080
5097
|
*/
|
|
5081
5098
|
Axes.TRANSFORM = TRANSFORM;
|
|
5082
|
-
/**
|
|
5083
|
-
* @name DIRECTION_NONE
|
|
5084
|
-
* @constant
|
|
5085
|
-
* @type {Number}
|
|
5099
|
+
/**
|
|
5100
|
+
* @name DIRECTION_NONE
|
|
5101
|
+
* @constant
|
|
5102
|
+
* @type {Number}
|
|
5086
5103
|
*/
|
|
5087
5104
|
Axes.DIRECTION_NONE = DIRECTION_NONE;
|
|
5088
|
-
/**
|
|
5089
|
-
* @name DIRECTION_LEFT
|
|
5090
|
-
* @constant
|
|
5091
|
-
* @type {Number}
|
|
5105
|
+
/**
|
|
5106
|
+
* @name DIRECTION_LEFT
|
|
5107
|
+
* @constant
|
|
5108
|
+
* @type {Number}
|
|
5092
5109
|
*/
|
|
5093
5110
|
Axes.DIRECTION_LEFT = DIRECTION_LEFT;
|
|
5094
|
-
/**
|
|
5095
|
-
* @name DIRECTION_RIGHT
|
|
5096
|
-
* @constant
|
|
5097
|
-
* @type {Number}
|
|
5111
|
+
/**
|
|
5112
|
+
* @name DIRECTION_RIGHT
|
|
5113
|
+
* @constant
|
|
5114
|
+
* @type {Number}
|
|
5098
5115
|
*/
|
|
5099
5116
|
Axes.DIRECTION_RIGHT = DIRECTION_RIGHT;
|
|
5100
|
-
/**
|
|
5101
|
-
* @name DIRECTION_UP
|
|
5102
|
-
* @constant
|
|
5103
|
-
* @type {Number}
|
|
5117
|
+
/**
|
|
5118
|
+
* @name DIRECTION_UP
|
|
5119
|
+
* @constant
|
|
5120
|
+
* @type {Number}
|
|
5104
5121
|
*/
|
|
5105
5122
|
Axes.DIRECTION_UP = DIRECTION_UP;
|
|
5106
|
-
/**
|
|
5107
|
-
* @name DIRECTION_DOWN
|
|
5108
|
-
* @constant
|
|
5109
|
-
* @type {Number}
|
|
5123
|
+
/**
|
|
5124
|
+
* @name DIRECTION_DOWN
|
|
5125
|
+
* @constant
|
|
5126
|
+
* @type {Number}
|
|
5110
5127
|
*/
|
|
5111
5128
|
Axes.DIRECTION_DOWN = DIRECTION_DOWN;
|
|
5112
|
-
/**
|
|
5113
|
-
* @name DIRECTION_HORIZONTAL
|
|
5114
|
-
* @constant
|
|
5115
|
-
* @type {Number}
|
|
5129
|
+
/**
|
|
5130
|
+
* @name DIRECTION_HORIZONTAL
|
|
5131
|
+
* @constant
|
|
5132
|
+
* @type {Number}
|
|
5116
5133
|
*/
|
|
5117
5134
|
Axes.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;
|
|
5118
|
-
/**
|
|
5119
|
-
* @name DIRECTION_VERTICAL
|
|
5120
|
-
* @constant
|
|
5121
|
-
* @type {Number}
|
|
5135
|
+
/**
|
|
5136
|
+
* @name DIRECTION_VERTICAL
|
|
5137
|
+
* @constant
|
|
5138
|
+
* @type {Number}
|
|
5122
5139
|
*/
|
|
5123
5140
|
Axes.DIRECTION_VERTICAL = DIRECTION_VERTICAL;
|
|
5124
|
-
/**
|
|
5125
|
-
* @name DIRECTION_ALL
|
|
5126
|
-
* @constant
|
|
5127
|
-
* @type {Number}
|
|
5141
|
+
/**
|
|
5142
|
+
* @name DIRECTION_ALL
|
|
5143
|
+
* @constant
|
|
5144
|
+
* @type {Number}
|
|
5128
5145
|
*/
|
|
5129
5146
|
Axes.DIRECTION_ALL = DIRECTION_ALL;
|
|
5130
5147
|
__decorate([Computed], Axes.prototype, "holding", null);
|
|
@@ -5132,9 +5149,9 @@ version: 4.12.0-beta.0
|
|
|
5132
5149
|
return Axes;
|
|
5133
5150
|
}(Component);
|
|
5134
5151
|
|
|
5135
|
-
/*
|
|
5136
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
5137
|
-
* egjs projects are licensed under the MIT license
|
|
5152
|
+
/*
|
|
5153
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5154
|
+
* egjs projects are licensed under the MIT license
|
|
5138
5155
|
*/
|
|
5139
5156
|
// get user's direction
|
|
5140
5157
|
var getDirectionByAngle = function (angle, thresholdAngle) {
|
|
@@ -5144,73 +5161,73 @@ version: 4.12.0-beta.0
|
|
|
5144
5161
|
var toAngle = Math.abs(angle);
|
|
5145
5162
|
return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
|
|
5146
5163
|
};
|
|
5147
|
-
/**
|
|
5148
|
-
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5149
|
-
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
5150
|
-
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
5151
|
-
* - touch: Touch screen
|
|
5152
|
-
* - mouse: Mouse
|
|
5153
|
-
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
5154
|
-
* - touch: 터치 입력 장치
|
|
5155
|
-
* - mouse: 마우스
|
|
5156
|
-
* - pointer: 마우스 및 터치</ko>
|
|
5157
|
-
* @param {String[]} [inputKey=["any"]] List of key combinations to allow input
|
|
5158
|
-
* - any: any key
|
|
5159
|
-
* - shift: shift key
|
|
5160
|
-
* - ctrl: ctrl key and pinch gesture on the trackpad
|
|
5161
|
-
* - alt: alt key
|
|
5162
|
-
* - meta: meta key
|
|
5163
|
-
* - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
|
|
5164
|
-
* - any: 아무 키
|
|
5165
|
-
* - shift: shift 키
|
|
5166
|
-
* - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
|
|
5167
|
-
* - alt: alt 키
|
|
5168
|
-
* - meta: meta 키
|
|
5169
|
-
* - none: 아무 키도 눌리지 않은 상태 </ko>
|
|
5170
|
-
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
5171
|
-
* - left: Left mouse button and normal touch
|
|
5172
|
-
* - middle: Mouse wheel press
|
|
5173
|
-
* - right: Right mouse button <ko>입력을 허용할 버튼 목록
|
|
5174
|
-
* - left: 마우스 왼쪽 버튼
|
|
5175
|
-
* - middle: 마우스 휠 눌림
|
|
5176
|
-
* - right: 마우스 오른쪽 버튼 </ko>
|
|
5177
|
-
* @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
|
|
5178
|
-
* @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
|
|
5179
|
-
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5180
|
-
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5181
|
-
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5182
|
-
* @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>
|
|
5183
|
-
* @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>
|
|
5184
|
-
* @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>
|
|
5185
|
-
* @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>
|
|
5164
|
+
/**
|
|
5165
|
+
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5166
|
+
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
5167
|
+
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
5168
|
+
* - touch: Touch screen
|
|
5169
|
+
* - mouse: Mouse
|
|
5170
|
+
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
5171
|
+
* - touch: 터치 입력 장치
|
|
5172
|
+
* - mouse: 마우스
|
|
5173
|
+
* - pointer: 마우스 및 터치</ko>
|
|
5174
|
+
* @param {String[]} [inputKey=["any"]] List of key combinations to allow input
|
|
5175
|
+
* - any: any key
|
|
5176
|
+
* - shift: shift key
|
|
5177
|
+
* - ctrl: ctrl key and pinch gesture on the trackpad
|
|
5178
|
+
* - alt: alt key
|
|
5179
|
+
* - meta: meta key
|
|
5180
|
+
* - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
|
|
5181
|
+
* - any: 아무 키
|
|
5182
|
+
* - shift: shift 키
|
|
5183
|
+
* - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
|
|
5184
|
+
* - alt: alt 키
|
|
5185
|
+
* - meta: meta 키
|
|
5186
|
+
* - none: 아무 키도 눌리지 않은 상태 </ko>
|
|
5187
|
+
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
5188
|
+
* - left: Left mouse button and normal touch
|
|
5189
|
+
* - middle: Mouse wheel press
|
|
5190
|
+
* - right: Right mouse button <ko>입력을 허용할 버튼 목록
|
|
5191
|
+
* - left: 마우스 왼쪽 버튼
|
|
5192
|
+
* - middle: 마우스 휠 눌림
|
|
5193
|
+
* - right: 마우스 오른쪽 버튼 </ko>
|
|
5194
|
+
* @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
|
|
5195
|
+
* @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
|
|
5196
|
+
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5197
|
+
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5198
|
+
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5199
|
+
* @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>
|
|
5200
|
+
* @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>
|
|
5201
|
+
* @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>
|
|
5202
|
+
* @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
5203
|
**/
|
|
5187
|
-
/**
|
|
5188
|
-
* 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.
|
|
5189
|
-
* @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
|
|
5190
|
-
*
|
|
5191
|
-
* @example
|
|
5192
|
-
* ```js
|
|
5193
|
-
* const pan = new eg.Axes.PanInput("#area", {
|
|
5194
|
-
* inputType: ["touch"],
|
|
5195
|
-
* scale: [1, 1.3],
|
|
5196
|
-
* });
|
|
5197
|
-
*
|
|
5198
|
-
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5199
|
-
* // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5200
|
-
* axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
|
|
5201
|
-
*
|
|
5202
|
-
* // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5203
|
-
* axes.connect(["something1"], pan); // or axes.connect("something1", pan);
|
|
5204
|
-
*
|
|
5205
|
-
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5206
|
-
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5207
|
-
* ```
|
|
5208
|
-
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5209
|
-
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5204
|
+
/**
|
|
5205
|
+
* 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.
|
|
5206
|
+
* @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
|
|
5207
|
+
*
|
|
5208
|
+
* @example
|
|
5209
|
+
* ```js
|
|
5210
|
+
* const pan = new eg.Axes.PanInput("#area", {
|
|
5211
|
+
* inputType: ["touch"],
|
|
5212
|
+
* scale: [1, 1.3],
|
|
5213
|
+
* });
|
|
5214
|
+
*
|
|
5215
|
+
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5216
|
+
* // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5217
|
+
* axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
|
|
5218
|
+
*
|
|
5219
|
+
* // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5220
|
+
* axes.connect(["something1"], pan); // or axes.connect("something1", pan);
|
|
5221
|
+
*
|
|
5222
|
+
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5223
|
+
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5224
|
+
* ```
|
|
5225
|
+
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5226
|
+
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5210
5227
|
*/
|
|
5211
5228
|
var PanInput = /*#__PURE__*/function () {
|
|
5212
|
-
/**
|
|
5213
|
-
*
|
|
5229
|
+
/**
|
|
5230
|
+
*
|
|
5214
5231
|
*/
|
|
5215
5232
|
function PanInput(el, options) {
|
|
5216
5233
|
var _this = this;
|
|
@@ -5259,56 +5276,60 @@ version: 4.12.0-beta.0
|
|
|
5259
5276
|
this._detachWindowEvent(this._activeEvent);
|
|
5260
5277
|
}
|
|
5261
5278
|
this._attachElementEvent(observer);
|
|
5262
|
-
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5263
5279
|
return this;
|
|
5264
5280
|
};
|
|
5265
5281
|
__proto.disconnect = function () {
|
|
5266
5282
|
this._detachElementEvent();
|
|
5267
5283
|
this._detachWindowEvent(this._activeEvent);
|
|
5268
|
-
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5269
|
-
revertCssProps(this.element, this._originalCssProps);
|
|
5270
|
-
}
|
|
5271
5284
|
this._direction = DIRECTION_NONE;
|
|
5272
5285
|
return this;
|
|
5273
5286
|
};
|
|
5274
|
-
/**
|
|
5275
|
-
* Destroys elements, properties, and events used in a module.
|
|
5276
|
-
* @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
|
|
5287
|
+
/**
|
|
5288
|
+
* Destroys elements, properties, and events used in a module.
|
|
5289
|
+
* @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
|
|
5277
5290
|
*/
|
|
5278
5291
|
__proto.destroy = function () {
|
|
5279
5292
|
this.disconnect();
|
|
5280
5293
|
this.element = null;
|
|
5281
5294
|
};
|
|
5282
|
-
/**
|
|
5283
|
-
* Enables input devices
|
|
5284
|
-
* @ko 입력 장치를 사용할 수 있게 한다
|
|
5285
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5295
|
+
/**
|
|
5296
|
+
* Enables input devices
|
|
5297
|
+
* @ko 입력 장치를 사용할 수 있게 한다
|
|
5298
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5286
5299
|
*/
|
|
5287
5300
|
__proto.enable = function () {
|
|
5288
|
-
this._enabled
|
|
5301
|
+
if (!this._enabled) {
|
|
5302
|
+
this._enabled = true;
|
|
5303
|
+
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5304
|
+
}
|
|
5289
5305
|
return this;
|
|
5290
5306
|
};
|
|
5291
|
-
/**
|
|
5292
|
-
* Disables input devices
|
|
5293
|
-
* @ko 입력 장치를 사용할 수 없게 한다.
|
|
5294
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5307
|
+
/**
|
|
5308
|
+
* Disables input devices
|
|
5309
|
+
* @ko 입력 장치를 사용할 수 없게 한다.
|
|
5310
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5295
5311
|
*/
|
|
5296
5312
|
__proto.disable = function () {
|
|
5297
|
-
this._enabled
|
|
5313
|
+
if (this._enabled) {
|
|
5314
|
+
this._enabled = false;
|
|
5315
|
+
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5316
|
+
revertCssProps(this.element, this._originalCssProps);
|
|
5317
|
+
}
|
|
5318
|
+
}
|
|
5298
5319
|
return this;
|
|
5299
5320
|
};
|
|
5300
|
-
/**
|
|
5301
|
-
* Returns whether to use an input device
|
|
5302
|
-
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5303
|
-
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5321
|
+
/**
|
|
5322
|
+
* Returns whether to use an input device
|
|
5323
|
+
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5324
|
+
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5304
5325
|
*/
|
|
5305
5326
|
__proto.isEnabled = function () {
|
|
5306
5327
|
return this._enabled;
|
|
5307
5328
|
};
|
|
5308
|
-
/**
|
|
5309
|
-
* Releases current user input.
|
|
5310
|
-
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5311
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5329
|
+
/**
|
|
5330
|
+
* Releases current user input.
|
|
5331
|
+
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5332
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5312
5333
|
*/
|
|
5313
5334
|
__proto.release = function () {
|
|
5314
5335
|
var activeEvent = this._activeEvent;
|
|
@@ -5451,7 +5472,7 @@ version: 4.12.0-beta.0
|
|
|
5451
5472
|
throw new Error("Element to connect input does not exist.");
|
|
5452
5473
|
}
|
|
5453
5474
|
this._observer = observer;
|
|
5454
|
-
this.
|
|
5475
|
+
this.enable();
|
|
5455
5476
|
this._activeEvent = activeEvent;
|
|
5456
5477
|
element.addEventListener("click", this._preventClickWhenDragged, true);
|
|
5457
5478
|
activeEvent.start.forEach(function (event) {
|
|
@@ -5475,15 +5496,15 @@ version: 4.12.0-beta.0
|
|
|
5475
5496
|
element.removeEventListener(event, _this._voidFunction);
|
|
5476
5497
|
});
|
|
5477
5498
|
}
|
|
5478
|
-
this.
|
|
5499
|
+
this.disable();
|
|
5479
5500
|
this._observer = null;
|
|
5480
5501
|
};
|
|
5481
5502
|
return PanInput;
|
|
5482
5503
|
}();
|
|
5483
5504
|
|
|
5484
|
-
/*
|
|
5485
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
5486
|
-
* egjs projects are licensed under the MIT license
|
|
5505
|
+
/*
|
|
5506
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5507
|
+
* egjs projects are licensed under the MIT license
|
|
5487
5508
|
*/
|
|
5488
5509
|
|
|
5489
5510
|
var Axes$1 = Axes;
|
|
@@ -12983,10 +13004,243 @@ version: 4.12.0-beta.0
|
|
|
12983
13004
|
* Flicking.VERSION; // ex) 4.0.0
|
|
12984
13005
|
* ```
|
|
12985
13006
|
*/
|
|
12986
|
-
Flicking.VERSION = "4.12.0-beta.
|
|
13007
|
+
Flicking.VERSION = "4.12.0-beta.2";
|
|
12987
13008
|
return Flicking;
|
|
12988
13009
|
}(Component);
|
|
12989
13010
|
|
|
13011
|
+
/*
|
|
13012
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
13013
|
+
* egjs projects are licensed under the MIT license
|
|
13014
|
+
*/
|
|
13015
|
+
/**
|
|
13016
|
+
* @extends Component
|
|
13017
|
+
* @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
|
|
13018
|
+
* @requires {@link https://github.com/naver/egjs-component|@egjs/component}
|
|
13019
|
+
* @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
|
|
13020
|
+
*/
|
|
13021
|
+
var CrossFlicking = /*#__PURE__*/function (_super) {
|
|
13022
|
+
__extends$3(CrossFlicking, _super);
|
|
13023
|
+
// Options Setter
|
|
13024
|
+
// public set align(val: FlickingOptions["align"]) {
|
|
13025
|
+
// this._align = val;
|
|
13026
|
+
// }
|
|
13027
|
+
function CrossFlicking(root, _a) {
|
|
13028
|
+
var _b = (_a === void 0 ? {} : _a).verticalOptions,
|
|
13029
|
+
verticalOptions = _b === void 0 ? undefined : _b;
|
|
13030
|
+
var _this = _super.call(this, root) || this;
|
|
13031
|
+
_this._onHorizontalHoldStart = function () {
|
|
13032
|
+
_this.dragThreshold = 10;
|
|
13033
|
+
_this._moveDirection = null;
|
|
13034
|
+
};
|
|
13035
|
+
_this._onHorizontalMove = function (e) {
|
|
13036
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
13037
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13038
|
+
child.dragThreshold = Infinity;
|
|
13039
|
+
});
|
|
13040
|
+
_this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
|
|
13041
|
+
}
|
|
13042
|
+
};
|
|
13043
|
+
_this._onHorizontalMoveEnd = function (e) {
|
|
13044
|
+
var visiblePanels = _this.visiblePanels;
|
|
13045
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13046
|
+
child.dragThreshold = 10;
|
|
13047
|
+
});
|
|
13048
|
+
_this._moveDirection = null;
|
|
13049
|
+
if (visiblePanels.length > 1) {
|
|
13050
|
+
_this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
|
|
13051
|
+
} else {
|
|
13052
|
+
_this._nextIndex = visiblePanels[0].index;
|
|
13053
|
+
}
|
|
13054
|
+
_this._verticalFlicking.forEach(function (child, i) {
|
|
13055
|
+
if (_this._nextIndex !== i) {
|
|
13056
|
+
var _a = _this._verticalState[i],
|
|
13057
|
+
start = _a.start,
|
|
13058
|
+
end = _a.end;
|
|
13059
|
+
if (child.index < start) {
|
|
13060
|
+
child.stopAnimation();
|
|
13061
|
+
void child.moveTo(start, 0);
|
|
13062
|
+
} else if (child.index > end) {
|
|
13063
|
+
child.stopAnimation();
|
|
13064
|
+
void child.moveTo(end, 0);
|
|
13065
|
+
}
|
|
13066
|
+
}
|
|
13067
|
+
});
|
|
13068
|
+
if (e.isTrusted) {
|
|
13069
|
+
_this._syncToCategory(_this._verticalFlicking[_this._nextIndex].index, _this._nextIndex);
|
|
13070
|
+
}
|
|
13071
|
+
};
|
|
13072
|
+
_this._onVerticalHoldStart = function () {
|
|
13073
|
+
_this._verticalFlicking.forEach(function (child) {
|
|
13074
|
+
child.dragThreshold = 10;
|
|
13075
|
+
});
|
|
13076
|
+
_this._moveDirection = null;
|
|
13077
|
+
};
|
|
13078
|
+
_this._onVerticalMove = function (e) {
|
|
13079
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
13080
|
+
_this.dragThreshold = Infinity;
|
|
13081
|
+
_this._moveDirection = MOVE_DIRECTION.VERTICAL;
|
|
13082
|
+
}
|
|
13083
|
+
};
|
|
13084
|
+
_this._onVerticalMoveEnd = function () {
|
|
13085
|
+
_this.dragThreshold = 10;
|
|
13086
|
+
_this._moveDirection = null;
|
|
13087
|
+
};
|
|
13088
|
+
_this._onVerticalChanged = function (e) {
|
|
13089
|
+
// this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
|
|
13090
|
+
// 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
|
|
13091
|
+
if (_this.visiblePanels.length < 2 && _this._verticalFlicking[_this.index] === e.currentTarget) {
|
|
13092
|
+
_this._syncToCategory(e.index, _this.index);
|
|
13093
|
+
}
|
|
13094
|
+
};
|
|
13095
|
+
var horizontalPanels = toArray$2(getElement(root).children[0].children);
|
|
13096
|
+
// Internal states
|
|
13097
|
+
_this._verticalState = _this._createVerticalState(horizontalPanels);
|
|
13098
|
+
_this._moveDirection = null;
|
|
13099
|
+
_this._nextIndex = 0;
|
|
13100
|
+
// Bind options
|
|
13101
|
+
_this._verticalOptions = verticalOptions;
|
|
13102
|
+
// Create core components
|
|
13103
|
+
_this._verticalFlicking = _this._createVerticalFlicking(horizontalPanels);
|
|
13104
|
+
return _this;
|
|
13105
|
+
}
|
|
13106
|
+
var __proto = CrossFlicking.prototype;
|
|
13107
|
+
Object.defineProperty(__proto, "verticalFlicking", {
|
|
13108
|
+
// Components
|
|
13109
|
+
/**
|
|
13110
|
+
* {@link Control} instance of the Flicking
|
|
13111
|
+
* @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스
|
|
13112
|
+
* @type {Control}
|
|
13113
|
+
* @default SnapControl
|
|
13114
|
+
* @readonly
|
|
13115
|
+
* @see Control
|
|
13116
|
+
* @see SnapControl
|
|
13117
|
+
* @see FreeControl
|
|
13118
|
+
*/
|
|
13119
|
+
get: function () {
|
|
13120
|
+
return this._verticalFlicking;
|
|
13121
|
+
},
|
|
13122
|
+
enumerable: false,
|
|
13123
|
+
configurable: true
|
|
13124
|
+
});
|
|
13125
|
+
Object.defineProperty(__proto, "verticalState", {
|
|
13126
|
+
// Internal States
|
|
13127
|
+
/**
|
|
13128
|
+
* Whether Flicking's {@link Flicking#init init()} is called.
|
|
13129
|
+
* This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.
|
|
13130
|
+
* @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.
|
|
13131
|
+
* 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.
|
|
13132
|
+
* @type {boolean}
|
|
13133
|
+
* @default false
|
|
13134
|
+
* @readonly
|
|
13135
|
+
*/
|
|
13136
|
+
get: function () {
|
|
13137
|
+
return this._verticalState;
|
|
13138
|
+
},
|
|
13139
|
+
enumerable: false,
|
|
13140
|
+
configurable: true
|
|
13141
|
+
});
|
|
13142
|
+
Object.defineProperty(__proto, "verticalOptions", {
|
|
13143
|
+
// Options Getter
|
|
13144
|
+
/**
|
|
13145
|
+
* Change active panel index on mouse/touch hold while animating.
|
|
13146
|
+
* `index` of the `willChange`/`willRestore` event will be used as new index.
|
|
13147
|
+
* @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
|
|
13148
|
+
* `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
|
|
13149
|
+
* @type {FlickingOptions}
|
|
13150
|
+
* @default undefined
|
|
13151
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
|
|
13152
|
+
*/
|
|
13153
|
+
get: function () {
|
|
13154
|
+
return this._verticalOptions;
|
|
13155
|
+
},
|
|
13156
|
+
enumerable: false,
|
|
13157
|
+
configurable: true
|
|
13158
|
+
});
|
|
13159
|
+
/**
|
|
13160
|
+
* Initialize Flicking and move to the default index
|
|
13161
|
+
* This is automatically called on Flicking's constructor when `autoInit` is true(default)
|
|
13162
|
+
* @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
|
|
13163
|
+
* 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
|
|
13164
|
+
* @fires Flicking#ready
|
|
13165
|
+
* @return {Promise<void>}
|
|
13166
|
+
*/
|
|
13167
|
+
__proto.init = function () {
|
|
13168
|
+
var _this = this;
|
|
13169
|
+
return _super.prototype.init.call(this).then(function () {
|
|
13170
|
+
return _this._addComponentEvents();
|
|
13171
|
+
});
|
|
13172
|
+
};
|
|
13173
|
+
__proto._addComponentEvents = function () {
|
|
13174
|
+
var _this = this;
|
|
13175
|
+
this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
|
|
13176
|
+
this.on(EVENTS.MOVE, this._onHorizontalMove);
|
|
13177
|
+
this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
|
|
13178
|
+
this._verticalFlicking.forEach(function (flicking) {
|
|
13179
|
+
flicking.on(EVENTS.HOLD_START, _this._onVerticalHoldStart);
|
|
13180
|
+
flicking.on(EVENTS.MOVE, _this._onVerticalMove);
|
|
13181
|
+
flicking.on(EVENTS.MOVE_END, _this._onVerticalMoveEnd);
|
|
13182
|
+
flicking.on(EVENTS.CHANGED, _this._onVerticalChanged);
|
|
13183
|
+
});
|
|
13184
|
+
};
|
|
13185
|
+
__proto._createVerticalState = function (panels) {
|
|
13186
|
+
// data-index로 분류하기 전에 임시로 모든 children에 대해 vertical flicking으로 해보자.
|
|
13187
|
+
// panels에 data-attributes가 붙어있을 때와 안 붙어있을 때를 다르게 처리
|
|
13188
|
+
// 붙어있다면 가상의 viewport들을 index 갯수만큼 만들어줘야 한다
|
|
13189
|
+
var verticalPanels = "";
|
|
13190
|
+
var verticalState = panels.reduce(function (state, panel) {
|
|
13191
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13192
|
+
verticalPanels += panel.innerHTML;
|
|
13193
|
+
return __spread$1(state, [{
|
|
13194
|
+
start: start,
|
|
13195
|
+
end: start + panel.children.length - 1,
|
|
13196
|
+
element: panel
|
|
13197
|
+
}]);
|
|
13198
|
+
}, []);
|
|
13199
|
+
var verticalCamera = document.createElement("div");
|
|
13200
|
+
verticalCamera.classList.add(CLASS.CAMERA);
|
|
13201
|
+
verticalCamera.innerHTML = verticalPanels;
|
|
13202
|
+
panels.forEach(function (panel) {
|
|
13203
|
+
[CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
|
|
13204
|
+
if (!panel.classList.contains(className)) {
|
|
13205
|
+
panel.classList.add(className);
|
|
13206
|
+
}
|
|
13207
|
+
});
|
|
13208
|
+
panel.innerHTML = verticalCamera.outerHTML;
|
|
13209
|
+
});
|
|
13210
|
+
return verticalState;
|
|
13211
|
+
};
|
|
13212
|
+
__proto._createVerticalFlicking = function (panels) {
|
|
13213
|
+
var _this = this;
|
|
13214
|
+
return panels.map(function (panel, i) {
|
|
13215
|
+
return new Flicking(panel, __assign$2(__assign$2({}, _this.verticalOptions), {
|
|
13216
|
+
horizontal: false,
|
|
13217
|
+
panelsPerView: 1,
|
|
13218
|
+
defaultIndex: _this._verticalState[i].start
|
|
13219
|
+
}));
|
|
13220
|
+
});
|
|
13221
|
+
};
|
|
13222
|
+
__proto._syncToCategory = function (index, outerIndex) {
|
|
13223
|
+
var _this = this;
|
|
13224
|
+
this.stopAnimation();
|
|
13225
|
+
this._verticalFlicking.forEach(function (child, i) {
|
|
13226
|
+
var _a = _this._verticalState[i],
|
|
13227
|
+
start = _a.start,
|
|
13228
|
+
end = _a.end;
|
|
13229
|
+
if (start <= index && end >= index && outerIndex !== i) {
|
|
13230
|
+
child.stopAnimation();
|
|
13231
|
+
void child.moveTo(index, 0);
|
|
13232
|
+
void _this.moveTo(i, 0);
|
|
13233
|
+
}
|
|
13234
|
+
});
|
|
13235
|
+
};
|
|
13236
|
+
return CrossFlicking;
|
|
13237
|
+
}(Flicking);
|
|
13238
|
+
|
|
13239
|
+
var CrossFlicking$1 = {
|
|
13240
|
+
__proto__: null,
|
|
13241
|
+
CrossFlicking: CrossFlicking
|
|
13242
|
+
};
|
|
13243
|
+
|
|
12990
13244
|
/*
|
|
12991
13245
|
* Copyright (c) 2015 NAVER Corp.
|
|
12992
13246
|
* egjs projects are licensed under the MIT license
|
|
@@ -13232,6 +13486,7 @@ version: 4.12.0-beta.0
|
|
|
13232
13486
|
merge(Flicking, Constants);
|
|
13233
13487
|
merge(Flicking, CFC);
|
|
13234
13488
|
merge(Flicking, Utils);
|
|
13489
|
+
merge(Flicking, CrossFlicking$1);
|
|
13235
13490
|
|
|
13236
13491
|
return Flicking;
|
|
13237
13492
|
|