@egjs/flicking 4.12.0-beta.8 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declaration/CrossFlicking.d.ts +89 -52
- package/declaration/Flicking.d.ts +244 -244
- package/declaration/camera/Camera.d.ts +90 -89
- package/declaration/camera/index.d.ts +4 -4
- package/declaration/camera/mode/BoundCameraMode.d.ts +13 -13
- package/declaration/camera/mode/CameraMode.d.ts +20 -20
- package/declaration/camera/mode/CircularCameraMode.d.ts +19 -19
- package/declaration/camera/mode/LinearCameraMode.d.ts +9 -9
- package/declaration/camera/mode/index.d.ts +6 -6
- package/declaration/cfc/getDefaultCameraTransform.d.ts +3 -3
- package/declaration/cfc/getRenderingPanels.d.ts +4 -4
- package/declaration/cfc/index.d.ts +5 -5
- package/declaration/cfc/sync.d.ts +4 -4
- package/declaration/cfc/withFlickingMethods.d.ts +2 -2
- package/declaration/const/axes.d.ts +8 -8
- package/declaration/const/error.d.ts +34 -34
- package/declaration/const/external.d.ts +54 -54
- package/declaration/control/AxesController.d.ts +44 -44
- package/declaration/control/Control.d.ts +45 -45
- package/declaration/control/FreeControl.d.ts +14 -14
- package/declaration/control/SnapControl.d.ts +16 -16
- package/declaration/control/StateMachine.d.ts +14 -14
- package/declaration/control/StrictControl.d.ts +20 -20
- package/declaration/control/index.d.ts +14 -14
- package/declaration/control/states/AnimatingState.d.ts +9 -9
- package/declaration/control/states/DisabledState.d.ts +9 -9
- package/declaration/control/states/DraggingState.d.ts +8 -8
- package/declaration/control/states/HoldingState.d.ts +10 -10
- package/declaration/control/states/IdleState.d.ts +9 -9
- package/declaration/control/states/State.d.ts +47 -47
- package/declaration/core/AnchorPoint.d.ts +15 -15
- package/declaration/core/AutoResizer.d.ts +16 -16
- package/declaration/core/FlickingError.d.ts +5 -5
- package/declaration/core/ResizeWatcher.d.ts +33 -33
- package/declaration/core/Viewport.d.ts +25 -25
- package/declaration/core/VirtualManager.d.ts +37 -37
- package/declaration/core/index.d.ts +6 -6
- package/declaration/core/panel/Panel.d.ts +89 -89
- package/declaration/core/panel/VirtualPanel.d.ts +19 -19
- package/declaration/core/panel/index.d.ts +5 -5
- package/declaration/core/panel/provider/ElementProvider.d.ts +8 -8
- package/declaration/core/panel/provider/VanillaElementProvider.d.ts +12 -12
- package/declaration/core/panel/provider/VirtualElementProvider.d.ts +15 -15
- package/declaration/core/panel/provider/index.d.ts +5 -5
- package/declaration/index.cjs.d.ts +3 -3
- package/declaration/index.d.ts +15 -15
- package/declaration/index.umd.d.ts +2 -2
- package/declaration/renderer/ExternalRenderer.d.ts +7 -7
- package/declaration/renderer/Renderer.d.ts +59 -59
- package/declaration/renderer/VanillaRenderer.d.ts +10 -10
- package/declaration/renderer/index.d.ts +6 -6
- package/declaration/renderer/strategy/NormalRenderingStrategy.d.ts +23 -23
- package/declaration/renderer/strategy/RenderingStrategy.d.ts +15 -15
- package/declaration/renderer/strategy/VirtualRenderingStrategy.d.ts +17 -17
- package/declaration/renderer/strategy/index.d.ts +5 -5
- package/declaration/type/event.d.ts +88 -88
- package/declaration/type/external.d.ts +31 -31
- package/declaration/type/internal.d.ts +13 -13
- package/declaration/utils.d.ts +47 -47
- package/dist/flicking-inline.css +37 -0
- package/dist/flicking-inline.min.css +1 -0
- package/dist/flicking-inline.min.min.css +1 -0
- package/dist/flicking.cjs.js +201 -120
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.css +40 -0
- package/dist/flicking.esm.js +200 -121
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +200 -120
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.css +1 -0
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.min.min.css +1 -0
- package/dist/flicking.pkgd.js +950 -870
- 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 +5 -6
- package/sass/flicking.sass +13 -0
- package/src/CrossFlicking.ts +224 -112
- package/src/Flicking.ts +1 -1
- package/src/camera/Camera.ts +24 -4
- package/src/control/states/HoldingState.ts +4 -0
- package/src/core/panel/Panel.ts +4 -0
- package/src/utils.ts +4 -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
|
|
7
|
+
version: 4.12.0
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1099,6 +1099,9 @@ version: 4.12.0-beta.8
|
|
|
1099
1099
|
var setSize = function (el, _a) {
|
|
1100
1100
|
var width = _a.width,
|
|
1101
1101
|
height = _a.height;
|
|
1102
|
+
if (!el) {
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1102
1105
|
if (width != null) {
|
|
1103
1106
|
if (isString(width)) {
|
|
1104
1107
|
el.style.width = width;
|
|
@@ -2695,7 +2698,7 @@ version: 4.12.0-beta.8
|
|
|
2695
2698
|
license: MIT
|
|
2696
2699
|
author: NAVER Corp.
|
|
2697
2700
|
repository: https://github.com/naver/egjs-axes
|
|
2698
|
-
version: 3.9.1
|
|
2701
|
+
version: 3.9.1
|
|
2699
2702
|
*/
|
|
2700
2703
|
|
|
2701
2704
|
/*! *****************************************************************************
|
|
@@ -2749,9 +2752,9 @@ version: 4.12.0-beta.8
|
|
|
2749
2752
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2750
2753
|
}
|
|
2751
2754
|
|
|
2752
|
-
/*
|
|
2753
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
2754
|
-
* egjs projects are licensed under the MIT license
|
|
2755
|
+
/*
|
|
2756
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2757
|
+
* egjs projects are licensed under the MIT license
|
|
2755
2758
|
*/
|
|
2756
2759
|
/* eslint-disable no-new-func, no-nested-ternary */
|
|
2757
2760
|
var win;
|
|
@@ -2766,9 +2769,9 @@ version: 4.12.0-beta.8
|
|
|
2766
2769
|
win = window;
|
|
2767
2770
|
}
|
|
2768
2771
|
|
|
2769
|
-
/*
|
|
2770
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
2771
|
-
* egjs projects are licensed under the MIT license
|
|
2772
|
+
/*
|
|
2773
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2774
|
+
* egjs projects are licensed under the MIT license
|
|
2772
2775
|
*/
|
|
2773
2776
|
var DIRECTION_NONE = 1;
|
|
2774
2777
|
var DIRECTION_LEFT = 2;
|
|
@@ -2894,19 +2897,19 @@ version: 4.12.0-beta.8
|
|
|
2894
2897
|
};
|
|
2895
2898
|
caf = win.clearTimeout;
|
|
2896
2899
|
}
|
|
2897
|
-
/**
|
|
2898
|
-
* A polyfill for the window.requestAnimationFrame() method.
|
|
2899
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
2900
|
-
* @private
|
|
2900
|
+
/**
|
|
2901
|
+
* A polyfill for the window.requestAnimationFrame() method.
|
|
2902
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
2903
|
+
* @private
|
|
2901
2904
|
*/
|
|
2902
2905
|
var requestAnimationFrame$1 = function (fp) {
|
|
2903
2906
|
return raf(fp);
|
|
2904
2907
|
};
|
|
2905
|
-
/**
|
|
2906
|
-
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2907
|
-
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2908
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2909
|
-
* @private
|
|
2908
|
+
/**
|
|
2909
|
+
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2910
|
+
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2911
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2912
|
+
* @private
|
|
2910
2913
|
*/
|
|
2911
2914
|
var cancelAnimationFrame = function (key) {
|
|
2912
2915
|
caf(key);
|
|
@@ -3055,32 +3058,32 @@ version: 4.12.0-beta.8
|
|
|
3055
3058
|
this._axes = _axes;
|
|
3056
3059
|
this.holdingCount = 0;
|
|
3057
3060
|
}
|
|
3058
|
-
/**
|
|
3059
|
-
* This event is fired when a user holds an element on the screen of the device.
|
|
3060
|
-
* @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
|
|
3061
|
-
* @event Axes#hold
|
|
3062
|
-
* @type {object}
|
|
3063
|
-
* @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
|
|
3064
|
-
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3065
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3066
|
-
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
|
|
3067
|
-
*
|
|
3068
|
-
* @example
|
|
3069
|
-
* ```js
|
|
3070
|
-
* const axes = new eg.Axes({
|
|
3071
|
-
* "x": {
|
|
3072
|
-
* range: [0, 100]
|
|
3073
|
-
* },
|
|
3074
|
-
* "zoom": {
|
|
3075
|
-
* range: [50, 30]
|
|
3076
|
-
* }
|
|
3077
|
-
* }).on("hold", function(event) {
|
|
3078
|
-
* // event.pos
|
|
3079
|
-
* // event.input
|
|
3080
|
-
* // event.inputEvent
|
|
3081
|
-
* // isTrusted
|
|
3082
|
-
* });
|
|
3083
|
-
* ```
|
|
3061
|
+
/**
|
|
3062
|
+
* This event is fired when a user holds an element on the screen of the device.
|
|
3063
|
+
* @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
|
|
3064
|
+
* @event Axes#hold
|
|
3065
|
+
* @type {object}
|
|
3066
|
+
* @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
|
|
3067
|
+
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3068
|
+
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3069
|
+
* @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>
|
|
3070
|
+
*
|
|
3071
|
+
* @example
|
|
3072
|
+
* ```js
|
|
3073
|
+
* const axes = new eg.Axes({
|
|
3074
|
+
* "x": {
|
|
3075
|
+
* range: [0, 100]
|
|
3076
|
+
* },
|
|
3077
|
+
* "zoom": {
|
|
3078
|
+
* range: [50, 30]
|
|
3079
|
+
* }
|
|
3080
|
+
* }).on("hold", function(event) {
|
|
3081
|
+
* // event.pos
|
|
3082
|
+
* // event.input
|
|
3083
|
+
* // event.inputEvent
|
|
3084
|
+
* // isTrusted
|
|
3085
|
+
* });
|
|
3086
|
+
* ```
|
|
3084
3087
|
*/
|
|
3085
3088
|
var __proto = EventManager.prototype;
|
|
3086
3089
|
__proto.hold = function (pos, option) {
|
|
@@ -3092,78 +3095,78 @@ version: 4.12.0-beta.8
|
|
|
3092
3095
|
isTrusted: true
|
|
3093
3096
|
}));
|
|
3094
3097
|
};
|
|
3095
|
-
/**
|
|
3096
|
-
* Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
|
|
3097
|
-
* @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
|
|
3098
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3099
|
-
* @example
|
|
3100
|
-
* ```js
|
|
3101
|
-
* const axes = new eg.Axes({
|
|
3102
|
-
* "x": {
|
|
3103
|
-
* range: [0, 100]
|
|
3104
|
-
* },
|
|
3105
|
-
* "zoom": {
|
|
3106
|
-
* range: [50, 30]
|
|
3107
|
-
* }
|
|
3108
|
-
* }).on("change", function(event) {
|
|
3109
|
-
* event.holding && event.set({x: 10});
|
|
3110
|
-
* });
|
|
3111
|
-
* ```
|
|
3098
|
+
/**
|
|
3099
|
+
* Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
|
|
3100
|
+
* @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
|
|
3101
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3102
|
+
* @example
|
|
3103
|
+
* ```js
|
|
3104
|
+
* const axes = new eg.Axes({
|
|
3105
|
+
* "x": {
|
|
3106
|
+
* range: [0, 100]
|
|
3107
|
+
* },
|
|
3108
|
+
* "zoom": {
|
|
3109
|
+
* range: [50, 30]
|
|
3110
|
+
* }
|
|
3111
|
+
* }).on("change", function(event) {
|
|
3112
|
+
* event.holding && event.set({x: 10});
|
|
3113
|
+
* });
|
|
3114
|
+
* ```
|
|
3112
3115
|
*/
|
|
3113
|
-
/** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
|
|
3114
|
-
* @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
|
|
3115
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3116
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
3117
|
-
* @example
|
|
3118
|
-
* ```js
|
|
3119
|
-
* const axes = new eg.Axes({
|
|
3120
|
-
* "x": {
|
|
3121
|
-
* range: [0, 100]
|
|
3122
|
-
* },
|
|
3123
|
-
* "zoom": {
|
|
3124
|
-
* range: [50, 30]
|
|
3125
|
-
* }
|
|
3126
|
-
* }).on("animationStart", function(event) {
|
|
3127
|
-
* event.setTo({x: 10}, 2000);
|
|
3128
|
-
* });
|
|
3129
|
-
* ```
|
|
3116
|
+
/** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
|
|
3117
|
+
* @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
|
|
3118
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3119
|
+
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
3120
|
+
* @example
|
|
3121
|
+
* ```js
|
|
3122
|
+
* const axes = new eg.Axes({
|
|
3123
|
+
* "x": {
|
|
3124
|
+
* range: [0, 100]
|
|
3125
|
+
* },
|
|
3126
|
+
* "zoom": {
|
|
3127
|
+
* range: [50, 30]
|
|
3128
|
+
* }
|
|
3129
|
+
* }).on("animationStart", function(event) {
|
|
3130
|
+
* event.setTo({x: 10}, 2000);
|
|
3131
|
+
* });
|
|
3132
|
+
* ```
|
|
3130
3133
|
*/
|
|
3131
|
-
/**
|
|
3132
|
-
* This event is fired when a user release an element on the screen of the device.
|
|
3133
|
-
* @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
|
|
3134
|
-
* @event Axes#release
|
|
3135
|
-
* @type {object}
|
|
3136
|
-
* @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
|
|
3137
|
-
* @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
|
|
3138
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3139
|
-
* @property {Object.<string, number>} bounceRatio If the coordinates at the time of release are in the bounce area, the current bounce value divided by the maximum bounce value <ko>손을 뗐을 때의 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치.</ko>
|
|
3140
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3141
|
-
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3142
|
-
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3143
|
-
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
|
|
3144
|
-
*
|
|
3145
|
-
* @example
|
|
3146
|
-
* ```js
|
|
3147
|
-
* const axes = new eg.Axes({
|
|
3148
|
-
* "x": {
|
|
3149
|
-
* range: [0, 100]
|
|
3150
|
-
* },
|
|
3151
|
-
* "zoom": {
|
|
3152
|
-
* range: [50, 30]
|
|
3153
|
-
* }
|
|
3154
|
-
* }).on("release", function(event) {
|
|
3155
|
-
* // event.depaPos
|
|
3156
|
-
* // event.destPos
|
|
3157
|
-
* // event.delta
|
|
3158
|
-
* // event.input
|
|
3159
|
-
* // event.inputEvent
|
|
3160
|
-
* // event.setTo
|
|
3161
|
-
* // event.isTrusted
|
|
3162
|
-
*
|
|
3163
|
-
* // if you want to change the animation coordinates to move after the 'release' event.
|
|
3164
|
-
* event.setTo({x: 10}, 2000);
|
|
3165
|
-
* });
|
|
3166
|
-
* ```
|
|
3134
|
+
/**
|
|
3135
|
+
* This event is fired when a user release an element on the screen of the device.
|
|
3136
|
+
* @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
|
|
3137
|
+
* @event Axes#release
|
|
3138
|
+
* @type {object}
|
|
3139
|
+
* @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
|
|
3140
|
+
* @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
|
|
3141
|
+
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3142
|
+
* @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>
|
|
3143
|
+
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3144
|
+
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3145
|
+
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3146
|
+
* @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>
|
|
3147
|
+
*
|
|
3148
|
+
* @example
|
|
3149
|
+
* ```js
|
|
3150
|
+
* const axes = new eg.Axes({
|
|
3151
|
+
* "x": {
|
|
3152
|
+
* range: [0, 100]
|
|
3153
|
+
* },
|
|
3154
|
+
* "zoom": {
|
|
3155
|
+
* range: [50, 30]
|
|
3156
|
+
* }
|
|
3157
|
+
* }).on("release", function(event) {
|
|
3158
|
+
* // event.depaPos
|
|
3159
|
+
* // event.destPos
|
|
3160
|
+
* // event.delta
|
|
3161
|
+
* // event.input
|
|
3162
|
+
* // event.inputEvent
|
|
3163
|
+
* // event.setTo
|
|
3164
|
+
* // event.isTrusted
|
|
3165
|
+
*
|
|
3166
|
+
* // if you want to change the animation coordinates to move after the 'release' event.
|
|
3167
|
+
* event.setTo({x: 10}, 2000);
|
|
3168
|
+
* });
|
|
3169
|
+
* ```
|
|
3167
3170
|
*/
|
|
3168
3171
|
__proto.triggerRelease = function (param) {
|
|
3169
3172
|
var _a = this._getRoundPos(param.destPos, param.depaPos),
|
|
@@ -3176,43 +3179,43 @@ version: 4.12.0-beta.8
|
|
|
3176
3179
|
bounceRatio: this._getBounceRatio(roundPos)
|
|
3177
3180
|
})));
|
|
3178
3181
|
};
|
|
3179
|
-
/**
|
|
3180
|
-
* This event is fired when coordinate changes.
|
|
3181
|
-
* @ko 좌표가 변경됐을 때 발생하는 이벤트
|
|
3182
|
-
* @event Axes#change
|
|
3183
|
-
* @type {object}
|
|
3184
|
-
* @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
|
|
3185
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3186
|
-
* @property {Object.<string, number>} bounceRatio If the current coordinates are in the bounce area, the current bounce value divided by the maximum bounce value <ko>현재 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치.</ko>
|
|
3187
|
-
* @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
|
|
3188
|
-
* @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3189
|
-
* @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3190
|
-
* @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
|
|
3191
|
-
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
|
|
3192
|
-
*
|
|
3193
|
-
* @example
|
|
3194
|
-
* ```js
|
|
3195
|
-
* const axes = new eg.Axes({
|
|
3196
|
-
* "x": {
|
|
3197
|
-
* range: [0, 100]
|
|
3198
|
-
* },
|
|
3199
|
-
* "zoom": {
|
|
3200
|
-
* range: [50, 30]
|
|
3201
|
-
* }
|
|
3202
|
-
* }).on("change", function(event) {
|
|
3203
|
-
* // event.pos
|
|
3204
|
-
* // event.delta
|
|
3205
|
-
* // event.input
|
|
3206
|
-
* // event.inputEvent
|
|
3207
|
-
* // event.holding
|
|
3208
|
-
* // event.set
|
|
3209
|
-
* // event.isTrusted
|
|
3210
|
-
*
|
|
3211
|
-
* // if you want to change the coordinates to move after the 'change' event.
|
|
3212
|
-
* // it works when the holding value of the change event is true.
|
|
3213
|
-
* event.holding && event.set({x: 10});
|
|
3214
|
-
* });
|
|
3215
|
-
* ```
|
|
3182
|
+
/**
|
|
3183
|
+
* This event is fired when coordinate changes.
|
|
3184
|
+
* @ko 좌표가 변경됐을 때 발생하는 이벤트
|
|
3185
|
+
* @event Axes#change
|
|
3186
|
+
* @type {object}
|
|
3187
|
+
* @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
|
|
3188
|
+
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3189
|
+
* @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>
|
|
3190
|
+
* @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
|
|
3191
|
+
* @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>
|
|
3192
|
+
* @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3193
|
+
* @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
|
|
3194
|
+
* @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>
|
|
3195
|
+
*
|
|
3196
|
+
* @example
|
|
3197
|
+
* ```js
|
|
3198
|
+
* const axes = new eg.Axes({
|
|
3199
|
+
* "x": {
|
|
3200
|
+
* range: [0, 100]
|
|
3201
|
+
* },
|
|
3202
|
+
* "zoom": {
|
|
3203
|
+
* range: [50, 30]
|
|
3204
|
+
* }
|
|
3205
|
+
* }).on("change", function(event) {
|
|
3206
|
+
* // event.pos
|
|
3207
|
+
* // event.delta
|
|
3208
|
+
* // event.input
|
|
3209
|
+
* // event.inputEvent
|
|
3210
|
+
* // event.holding
|
|
3211
|
+
* // event.set
|
|
3212
|
+
* // event.isTrusted
|
|
3213
|
+
*
|
|
3214
|
+
* // if you want to change the coordinates to move after the 'change' event.
|
|
3215
|
+
* // it works when the holding value of the change event is true.
|
|
3216
|
+
* event.holding && event.set({x: 10});
|
|
3217
|
+
* });
|
|
3218
|
+
* ```
|
|
3216
3219
|
*/
|
|
3217
3220
|
__proto.triggerChange = function (pos, depaPos, option, holding) {
|
|
3218
3221
|
var _this = this;
|
|
@@ -3249,42 +3252,42 @@ version: 4.12.0-beta.8
|
|
|
3249
3252
|
}
|
|
3250
3253
|
return !event.isCanceled();
|
|
3251
3254
|
};
|
|
3252
|
-
/**
|
|
3253
|
-
* This event is fired when animation starts.
|
|
3254
|
-
* @ko 에니메이션이 시작할 때 발생한다.
|
|
3255
|
-
* @event Axes#animationStart
|
|
3256
|
-
* @type {object}
|
|
3257
|
-
* @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
|
|
3258
|
-
* @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
|
|
3259
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3260
|
-
* @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
|
|
3261
|
-
* @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3262
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3263
|
-
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3264
|
-
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
|
|
3265
|
-
*
|
|
3266
|
-
* @example
|
|
3267
|
-
* ```js
|
|
3268
|
-
* const axes = new eg.Axes({
|
|
3269
|
-
* "x": {
|
|
3270
|
-
* range: [0, 100]
|
|
3271
|
-
* },
|
|
3272
|
-
* "zoom": {
|
|
3273
|
-
* range: [50, 30]
|
|
3274
|
-
* }
|
|
3275
|
-
* }).on("release", function(event) {
|
|
3276
|
-
* // event.depaPos
|
|
3277
|
-
* // event.destPos
|
|
3278
|
-
* // event.delta
|
|
3279
|
-
* // event.input
|
|
3280
|
-
* // event.inputEvent
|
|
3281
|
-
* // event.setTo
|
|
3282
|
-
* // event.isTrusted
|
|
3283
|
-
*
|
|
3284
|
-
* // if you want to change the animation coordinates to move after the 'animationStart' event.
|
|
3285
|
-
* event.setTo({x: 10}, 2000);
|
|
3286
|
-
* });
|
|
3287
|
-
* ```
|
|
3255
|
+
/**
|
|
3256
|
+
* This event is fired when animation starts.
|
|
3257
|
+
* @ko 에니메이션이 시작할 때 발생한다.
|
|
3258
|
+
* @event Axes#animationStart
|
|
3259
|
+
* @type {object}
|
|
3260
|
+
* @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
|
|
3261
|
+
* @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
|
|
3262
|
+
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3263
|
+
* @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
|
|
3264
|
+
* @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>
|
|
3265
|
+
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3266
|
+
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3267
|
+
* @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>
|
|
3268
|
+
*
|
|
3269
|
+
* @example
|
|
3270
|
+
* ```js
|
|
3271
|
+
* const axes = new eg.Axes({
|
|
3272
|
+
* "x": {
|
|
3273
|
+
* range: [0, 100]
|
|
3274
|
+
* },
|
|
3275
|
+
* "zoom": {
|
|
3276
|
+
* range: [50, 30]
|
|
3277
|
+
* }
|
|
3278
|
+
* }).on("release", function(event) {
|
|
3279
|
+
* // event.depaPos
|
|
3280
|
+
* // event.destPos
|
|
3281
|
+
* // event.delta
|
|
3282
|
+
* // event.input
|
|
3283
|
+
* // event.inputEvent
|
|
3284
|
+
* // event.setTo
|
|
3285
|
+
* // event.isTrusted
|
|
3286
|
+
*
|
|
3287
|
+
* // if you want to change the animation coordinates to move after the 'animationStart' event.
|
|
3288
|
+
* event.setTo({x: 10}, 2000);
|
|
3289
|
+
* });
|
|
3290
|
+
* ```
|
|
3288
3291
|
*/
|
|
3289
3292
|
__proto.triggerAnimationStart = function (param) {
|
|
3290
3293
|
var _a = this._getRoundPos(param.destPos, param.depaPos),
|
|
@@ -3297,26 +3300,26 @@ version: 4.12.0-beta.8
|
|
|
3297
3300
|
this._axes.trigger(event);
|
|
3298
3301
|
return !event.isCanceled();
|
|
3299
3302
|
};
|
|
3300
|
-
/**
|
|
3301
|
-
* This event is fired when animation ends.
|
|
3302
|
-
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3303
|
-
* @event Axes#animationEnd
|
|
3304
|
-
* @type {object}
|
|
3305
|
-
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
|
|
3306
|
-
*
|
|
3307
|
-
* @example
|
|
3308
|
-
* ```js
|
|
3309
|
-
* const axes = new eg.Axes({
|
|
3310
|
-
* "x": {
|
|
3311
|
-
* range: [0, 100]
|
|
3312
|
-
* },
|
|
3313
|
-
* "zoom": {
|
|
3314
|
-
* range: [50, 30]
|
|
3315
|
-
* }
|
|
3316
|
-
* }).on("animationEnd", function(event) {
|
|
3317
|
-
* // event.isTrusted
|
|
3318
|
-
* });
|
|
3319
|
-
* ```
|
|
3303
|
+
/**
|
|
3304
|
+
* This event is fired when animation ends.
|
|
3305
|
+
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3306
|
+
* @event Axes#animationEnd
|
|
3307
|
+
* @type {object}
|
|
3308
|
+
* @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>
|
|
3309
|
+
*
|
|
3310
|
+
* @example
|
|
3311
|
+
* ```js
|
|
3312
|
+
* const axes = new eg.Axes({
|
|
3313
|
+
* "x": {
|
|
3314
|
+
* range: [0, 100]
|
|
3315
|
+
* },
|
|
3316
|
+
* "zoom": {
|
|
3317
|
+
* range: [50, 30]
|
|
3318
|
+
* }
|
|
3319
|
+
* }).on("animationEnd", function(event) {
|
|
3320
|
+
* // event.isTrusted
|
|
3321
|
+
* });
|
|
3322
|
+
* ```
|
|
3320
3323
|
*/
|
|
3321
3324
|
__proto.triggerAnimationEnd = function (isTrusted) {
|
|
3322
3325
|
if (isTrusted === void 0) {
|
|
@@ -3326,26 +3329,26 @@ version: 4.12.0-beta.8
|
|
|
3326
3329
|
isTrusted: isTrusted
|
|
3327
3330
|
}));
|
|
3328
3331
|
};
|
|
3329
|
-
/**
|
|
3330
|
-
* This event is fired when all actions have been completed.
|
|
3331
|
-
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3332
|
-
* @event Axes#finish
|
|
3333
|
-
* @type {object}
|
|
3334
|
-
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
|
|
3335
|
-
*
|
|
3336
|
-
* @example
|
|
3337
|
-
* ```js
|
|
3338
|
-
* const axes = new eg.Axes({
|
|
3339
|
-
* "x": {
|
|
3340
|
-
* range: [0, 100]
|
|
3341
|
-
* },
|
|
3342
|
-
* "zoom": {
|
|
3343
|
-
* range: [50, 30]
|
|
3344
|
-
* }
|
|
3345
|
-
* }).on("finish", function(event) {
|
|
3346
|
-
* // event.isTrusted
|
|
3347
|
-
* });
|
|
3348
|
-
* ```
|
|
3332
|
+
/**
|
|
3333
|
+
* This event is fired when all actions have been completed.
|
|
3334
|
+
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3335
|
+
* @event Axes#finish
|
|
3336
|
+
* @type {object}
|
|
3337
|
+
* @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>
|
|
3338
|
+
*
|
|
3339
|
+
* @example
|
|
3340
|
+
* ```js
|
|
3341
|
+
* const axes = new eg.Axes({
|
|
3342
|
+
* "x": {
|
|
3343
|
+
* range: [0, 100]
|
|
3344
|
+
* },
|
|
3345
|
+
* "zoom": {
|
|
3346
|
+
* range: [50, 30]
|
|
3347
|
+
* }
|
|
3348
|
+
* }).on("finish", function(event) {
|
|
3349
|
+
* // event.isTrusted
|
|
3350
|
+
* });
|
|
3351
|
+
* ```
|
|
3349
3352
|
*/
|
|
3350
3353
|
__proto.triggerFinish = function (isTrusted) {
|
|
3351
3354
|
if (isTrusted === void 0) {
|
|
@@ -3427,9 +3430,9 @@ version: 4.12.0-beta.8
|
|
|
3427
3430
|
return InterruptManager;
|
|
3428
3431
|
}();
|
|
3429
3432
|
|
|
3430
|
-
/*
|
|
3431
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
3432
|
-
* egjs projects are licensed under the MIT license
|
|
3433
|
+
/*
|
|
3434
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
3435
|
+
* egjs projects are licensed under the MIT license
|
|
3433
3436
|
*/
|
|
3434
3437
|
var getInsidePosition = function (destPos, range, circular, bounce) {
|
|
3435
3438
|
var toDestPos = destPos;
|
|
@@ -3558,9 +3561,9 @@ version: 4.12.0-beta.8
|
|
|
3558
3561
|
});
|
|
3559
3562
|
this._complementOptions();
|
|
3560
3563
|
};
|
|
3561
|
-
/**
|
|
3562
|
-
* set up 'css' expression
|
|
3563
|
-
* @private
|
|
3564
|
+
/**
|
|
3565
|
+
* set up 'css' expression
|
|
3566
|
+
* @private
|
|
3564
3567
|
*/
|
|
3565
3568
|
__proto._complementOptions = function () {
|
|
3566
3569
|
var _this = this;
|
|
@@ -4456,15 +4459,15 @@ version: 4.12.0-beta.8
|
|
|
4456
4459
|
complete();
|
|
4457
4460
|
}
|
|
4458
4461
|
};
|
|
4459
|
-
/**
|
|
4460
|
-
* Get estimated final value.
|
|
4461
|
-
*
|
|
4462
|
-
* If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
|
|
4463
|
-
* - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
|
|
4464
|
-
* If dest Pos is outside the 'range of error' compared to the originally intended pos, it is returned rounded based on the originally intended pos.
|
|
4465
|
-
* - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
|
|
4466
|
-
* @param originalIntendedPos
|
|
4467
|
-
* @param destPos
|
|
4462
|
+
/**
|
|
4463
|
+
* Get estimated final value.
|
|
4464
|
+
*
|
|
4465
|
+
* If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
|
|
4466
|
+
* - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
|
|
4467
|
+
* 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.
|
|
4468
|
+
* - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
|
|
4469
|
+
* @param originalIntendedPos
|
|
4470
|
+
* @param destPos
|
|
4468
4471
|
*/
|
|
4469
4472
|
__proto._getFinalPos = function (destPos, originalIntendedPos) {
|
|
4470
4473
|
var _this = this;
|
|
@@ -4590,111 +4593,111 @@ version: 4.12.0-beta.8
|
|
|
4590
4593
|
return EasingManager;
|
|
4591
4594
|
}(AnimationManager);
|
|
4592
4595
|
|
|
4593
|
-
/**
|
|
4594
|
-
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4595
|
-
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4596
|
-
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4597
|
-
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4598
|
-
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4599
|
-
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4600
|
-
* @param {Number[]} [bounce] The size of bouncing area. The coordinates can exceed the coordinate area as much as the bouncing area based on user action. If the coordinates does not exceed the bouncing area when an element is dragged, the coordinates where bouncing effects are applied are retuned back into the coordinate area<ko>바운스 영역의 크기. 사용자의 동작에 따라 좌표가 좌표 영역을 넘어 바운스 영역의 크기만큼 더 이동할 수 있다. 사용자가 끌어다 놓는 동작을 했을 때 좌표가 바운스 영역에 있으면, 바운스 효과가 적용된 좌표가 다시 좌표 영역 안으로 들어온다</ko>
|
|
4601
|
-
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4602
|
-
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
4603
|
-
* @param {Boolean[]} [circular] Indicates whether a circular element is available. If it is set to "true" and an element is dragged outside the coordinate area, the element will appear on the other side.<ko>순환 여부. 'true'로 설정한 방향의 좌표 영역 밖으로 엘리먼트가 이동하면 반대 방향에서 엘리먼트가 나타난다</ko>
|
|
4604
|
-
* @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
|
|
4605
|
-
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
|
|
4596
|
+
/**
|
|
4597
|
+
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4598
|
+
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4599
|
+
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4600
|
+
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4601
|
+
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4602
|
+
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4603
|
+
* @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>
|
|
4604
|
+
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4605
|
+
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
4606
|
+
* @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>
|
|
4607
|
+
* @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
|
|
4608
|
+
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
|
|
4606
4609
|
**/
|
|
4607
|
-
/**
|
|
4608
|
-
* @typedef {Object} AxesOption The option object of the eg.Axes module
|
|
4609
|
-
* @ko eg.Axes 모듈의 옵션 객체
|
|
4610
|
-
* @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
|
|
4611
|
-
* @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
|
|
4612
|
-
* @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
|
|
4613
|
-
* @param {Number} [deceleration=0.0006] Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time. <ko>사용자의 동작으로 가속도가 적용된 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아진다</ko>
|
|
4614
|
-
* @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
|
|
4615
|
-
* - true: It can be paused or stopped by user action or the API.
|
|
4616
|
-
* - false: It cannot be paused or stopped by user action or the API while it is running.
|
|
4617
|
-
* <ko>진행 중인 애니메이션 중지 가능 여부.
|
|
4618
|
-
* - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
|
|
4619
|
-
* - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
|
|
4620
|
-
* @param {Number} [round=null] Rounding unit. For example, 0.1 rounds to 0.1 decimal point(6.1234 => 6.1), 5 rounds to 5 (93 => 95)
|
|
4621
|
-
* [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
|
|
4622
|
-
* [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
|
|
4623
|
-
* @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
|
|
4610
|
+
/**
|
|
4611
|
+
* @typedef {Object} AxesOption The option object of the eg.Axes module
|
|
4612
|
+
* @ko eg.Axes 모듈의 옵션 객체
|
|
4613
|
+
* @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
|
|
4614
|
+
* @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
|
|
4615
|
+
* @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
|
|
4616
|
+
* @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>
|
|
4617
|
+
* @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
|
|
4618
|
+
* - true: It can be paused or stopped by user action or the API.
|
|
4619
|
+
* - false: It cannot be paused or stopped by user action or the API while it is running.
|
|
4620
|
+
* <ko>진행 중인 애니메이션 중지 가능 여부.
|
|
4621
|
+
* - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
|
|
4622
|
+
* - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
|
|
4623
|
+
* @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)
|
|
4624
|
+
* [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
|
|
4625
|
+
* [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
|
|
4626
|
+
* @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
|
|
4624
4627
|
**/
|
|
4625
|
-
/**
|
|
4626
|
-
* A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.
|
|
4627
|
-
* @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
|
|
4628
|
-
* @extends eg.Component
|
|
4629
|
-
*
|
|
4630
|
-
* @param {Object.<string, AxisOption>} axis Axis information managed by eg.Axes. The key of the axis specifies the name to use as the logical virtual coordinate system. <ko>eg.Axes가 관리하는 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.</ko>
|
|
4631
|
-
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4632
|
-
* @param {Object.<string, number>} [startPos={}] The coordinates to be moved when creating an instance. It is applied with higher priority than startPos of axisOption.<ko>인스턴스 생성시 이동할 좌표, axisOption의 startPos보다 높은 우선순위로 적용된다.</ko>
|
|
4633
|
-
*
|
|
4634
|
-
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4635
|
-
* @example
|
|
4636
|
-
* ```js
|
|
4637
|
-
* // 1. Initialize eg.Axes
|
|
4638
|
-
* const axes = new eg.Axes({
|
|
4639
|
-
* something1: {
|
|
4640
|
-
* range: [0, 150],
|
|
4641
|
-
* bounce: 50
|
|
4642
|
-
* },
|
|
4643
|
-
* something2: {
|
|
4644
|
-
* range: [0, 200],
|
|
4645
|
-
* bounce: 100
|
|
4646
|
-
* },
|
|
4647
|
-
* somethingN: {
|
|
4648
|
-
* range: [1, 10],
|
|
4649
|
-
* }
|
|
4650
|
-
* }, {
|
|
4651
|
-
* deceleration : 0.0024
|
|
4652
|
-
* });
|
|
4653
|
-
*
|
|
4654
|
-
* // 2. attach event handler
|
|
4655
|
-
* axes.on({
|
|
4656
|
-
* "hold" : function(evt) {
|
|
4657
|
-
* },
|
|
4658
|
-
* "release" : function(evt) {
|
|
4659
|
-
* },
|
|
4660
|
-
* "animationStart" : function(evt) {
|
|
4661
|
-
* },
|
|
4662
|
-
* "animationEnd" : function(evt) {
|
|
4663
|
-
* },
|
|
4664
|
-
* "change" : function(evt) {
|
|
4665
|
-
* }
|
|
4666
|
-
* });
|
|
4667
|
-
*
|
|
4668
|
-
* // 3. Initialize inputTypes
|
|
4669
|
-
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4670
|
-
* scale: [0.5, 1]
|
|
4671
|
-
* });
|
|
4672
|
-
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4673
|
-
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4674
|
-
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4675
|
-
* scale: 1.5
|
|
4676
|
-
* });
|
|
4677
|
-
*
|
|
4678
|
-
* // 4. Connect eg.Axes and InputTypes
|
|
4679
|
-
* // [PanInput] When the mouse or touchscreen is down and moved.
|
|
4680
|
-
* // Connect the 'something2' axis to the mouse or touchscreen x position and
|
|
4681
|
-
* // connect the 'somethingN' axis to the mouse or touchscreen y position.
|
|
4682
|
-
* axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
|
|
4683
|
-
*
|
|
4684
|
-
* // Connect only one 'something1' axis to the mouse or touchscreen x position.
|
|
4685
|
-
* axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
|
|
4686
|
-
*
|
|
4687
|
-
* // Connect only one 'something2' axis to the mouse or touchscreen y position.
|
|
4688
|
-
* axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
|
|
4689
|
-
*
|
|
4690
|
-
* // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
|
|
4691
|
-
* axes.connect("something2", pinchInputArea);
|
|
4692
|
-
* ```
|
|
4628
|
+
/**
|
|
4629
|
+
* 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.
|
|
4630
|
+
* @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
|
|
4631
|
+
* @extends eg.Component
|
|
4632
|
+
*
|
|
4633
|
+
* @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>
|
|
4634
|
+
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4635
|
+
* @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>
|
|
4636
|
+
*
|
|
4637
|
+
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4638
|
+
* @example
|
|
4639
|
+
* ```js
|
|
4640
|
+
* // 1. Initialize eg.Axes
|
|
4641
|
+
* const axes = new eg.Axes({
|
|
4642
|
+
* something1: {
|
|
4643
|
+
* range: [0, 150],
|
|
4644
|
+
* bounce: 50
|
|
4645
|
+
* },
|
|
4646
|
+
* something2: {
|
|
4647
|
+
* range: [0, 200],
|
|
4648
|
+
* bounce: 100
|
|
4649
|
+
* },
|
|
4650
|
+
* somethingN: {
|
|
4651
|
+
* range: [1, 10],
|
|
4652
|
+
* }
|
|
4653
|
+
* }, {
|
|
4654
|
+
* deceleration : 0.0024
|
|
4655
|
+
* });
|
|
4656
|
+
*
|
|
4657
|
+
* // 2. attach event handler
|
|
4658
|
+
* axes.on({
|
|
4659
|
+
* "hold" : function(evt) {
|
|
4660
|
+
* },
|
|
4661
|
+
* "release" : function(evt) {
|
|
4662
|
+
* },
|
|
4663
|
+
* "animationStart" : function(evt) {
|
|
4664
|
+
* },
|
|
4665
|
+
* "animationEnd" : function(evt) {
|
|
4666
|
+
* },
|
|
4667
|
+
* "change" : function(evt) {
|
|
4668
|
+
* }
|
|
4669
|
+
* });
|
|
4670
|
+
*
|
|
4671
|
+
* // 3. Initialize inputTypes
|
|
4672
|
+
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4673
|
+
* scale: [0.5, 1]
|
|
4674
|
+
* });
|
|
4675
|
+
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4676
|
+
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4677
|
+
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4678
|
+
* scale: 1.5
|
|
4679
|
+
* });
|
|
4680
|
+
*
|
|
4681
|
+
* // 4. Connect eg.Axes and InputTypes
|
|
4682
|
+
* // [PanInput] When the mouse or touchscreen is down and moved.
|
|
4683
|
+
* // Connect the 'something2' axis to the mouse or touchscreen x position and
|
|
4684
|
+
* // connect the 'somethingN' axis to the mouse or touchscreen y position.
|
|
4685
|
+
* axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
|
|
4686
|
+
*
|
|
4687
|
+
* // Connect only one 'something1' axis to the mouse or touchscreen x position.
|
|
4688
|
+
* axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
|
|
4689
|
+
*
|
|
4690
|
+
* // Connect only one 'something2' axis to the mouse or touchscreen y position.
|
|
4691
|
+
* axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
|
|
4692
|
+
*
|
|
4693
|
+
* // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
|
|
4694
|
+
* axes.connect("something2", pinchInputArea);
|
|
4695
|
+
* ```
|
|
4693
4696
|
*/
|
|
4694
4697
|
var Axes = /*#__PURE__*/function (_super) {
|
|
4695
4698
|
__extends$1(Axes, _super);
|
|
4696
|
-
/**
|
|
4697
|
-
*
|
|
4699
|
+
/**
|
|
4700
|
+
*
|
|
4698
4701
|
*/
|
|
4699
4702
|
function Axes(axis, options, startPos) {
|
|
4700
4703
|
if (axis === void 0) {
|
|
@@ -4734,23 +4737,23 @@ version: 4.12.0-beta.8
|
|
|
4734
4737
|
}
|
|
4735
4738
|
var __proto = Axes.prototype;
|
|
4736
4739
|
Object.defineProperty(__proto, "holding", {
|
|
4737
|
-
/**
|
|
4738
|
-
* @name Axes#holding
|
|
4739
|
-
* @desc Returns true if at least one input is in progress.
|
|
4740
|
-
* @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
|
|
4741
|
-
*
|
|
4742
|
-
* @readonly
|
|
4743
|
-
* @type {boolean}
|
|
4744
|
-
* @example
|
|
4745
|
-
* ```js
|
|
4746
|
-
* const axes = new eg.Axes({
|
|
4747
|
-
* x: {
|
|
4748
|
-
* range: [0, 100],
|
|
4749
|
-
* },
|
|
4750
|
-
* });
|
|
4751
|
-
*
|
|
4752
|
-
* axes.holding
|
|
4753
|
-
* ```
|
|
4740
|
+
/**
|
|
4741
|
+
* @name Axes#holding
|
|
4742
|
+
* @desc Returns true if at least one input is in progress.
|
|
4743
|
+
* @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
|
|
4744
|
+
*
|
|
4745
|
+
* @readonly
|
|
4746
|
+
* @type {boolean}
|
|
4747
|
+
* @example
|
|
4748
|
+
* ```js
|
|
4749
|
+
* const axes = new eg.Axes({
|
|
4750
|
+
* x: {
|
|
4751
|
+
* range: [0, 100],
|
|
4752
|
+
* },
|
|
4753
|
+
* });
|
|
4754
|
+
*
|
|
4755
|
+
* axes.holding
|
|
4756
|
+
* ```
|
|
4754
4757
|
*/
|
|
4755
4758
|
get: function () {
|
|
4756
4759
|
return this.eventManager.holdingCount > 0;
|
|
@@ -4758,30 +4761,30 @@ version: 4.12.0-beta.8
|
|
|
4758
4761
|
enumerable: false,
|
|
4759
4762
|
configurable: true
|
|
4760
4763
|
});
|
|
4761
|
-
/**
|
|
4762
|
-
* Connect the axis of eg.Axes to the inputType.
|
|
4763
|
-
* @ko eg.Axes의 축과 inputType을 연결한다
|
|
4764
|
-
* @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
|
|
4765
|
-
* @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
|
|
4766
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4767
|
-
* @example
|
|
4768
|
-
* ```js
|
|
4769
|
-
* const axes = new eg.Axes({
|
|
4770
|
-
* "x": {
|
|
4771
|
-
* range: [0, 100]
|
|
4772
|
-
* },
|
|
4773
|
-
* "xOther": {
|
|
4774
|
-
* range: [-100, 100]
|
|
4775
|
-
* }
|
|
4776
|
-
* });
|
|
4777
|
-
*
|
|
4778
|
-
* axes.connect("x", new eg.Axes.PanInput("#area1"))
|
|
4779
|
-
* .connect("x xOther", new eg.Axes.PanInput("#area2"))
|
|
4780
|
-
* .connect(" xOther", new eg.Axes.PanInput("#area3"))
|
|
4781
|
-
* .connect(["x"], new eg.Axes.PanInput("#area4"))
|
|
4782
|
-
* .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
|
|
4783
|
-
* .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
|
|
4784
|
-
* ```
|
|
4764
|
+
/**
|
|
4765
|
+
* Connect the axis of eg.Axes to the inputType.
|
|
4766
|
+
* @ko eg.Axes의 축과 inputType을 연결한다
|
|
4767
|
+
* @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
|
|
4768
|
+
* @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
|
|
4769
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4770
|
+
* @example
|
|
4771
|
+
* ```js
|
|
4772
|
+
* const axes = new eg.Axes({
|
|
4773
|
+
* "x": {
|
|
4774
|
+
* range: [0, 100]
|
|
4775
|
+
* },
|
|
4776
|
+
* "xOther": {
|
|
4777
|
+
* range: [-100, 100]
|
|
4778
|
+
* }
|
|
4779
|
+
* });
|
|
4780
|
+
*
|
|
4781
|
+
* axes.connect("x", new eg.Axes.PanInput("#area1"))
|
|
4782
|
+
* .connect("x xOther", new eg.Axes.PanInput("#area2"))
|
|
4783
|
+
* .connect(" xOther", new eg.Axes.PanInput("#area3"))
|
|
4784
|
+
* .connect(["x"], new eg.Axes.PanInput("#area4"))
|
|
4785
|
+
* .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
|
|
4786
|
+
* .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
|
|
4787
|
+
* ```
|
|
4785
4788
|
*/
|
|
4786
4789
|
__proto.connect = function (axes, inputType) {
|
|
4787
4790
|
var mapped;
|
|
@@ -4799,33 +4802,33 @@ version: 4.12.0-beta.8
|
|
|
4799
4802
|
this._inputs.push(inputType);
|
|
4800
4803
|
return this;
|
|
4801
4804
|
};
|
|
4802
|
-
/**
|
|
4803
|
-
* Disconnect the axis of eg.Axes from the inputType.
|
|
4804
|
-
* @ko eg.Axes의 축과 inputType의 연결을 끊는다.
|
|
4805
|
-
* @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
|
|
4806
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4807
|
-
* @example
|
|
4808
|
-
* ```js
|
|
4809
|
-
* const axes = new eg.Axes({
|
|
4810
|
-
* "x": {
|
|
4811
|
-
* range: [0, 100]
|
|
4812
|
-
* },
|
|
4813
|
-
* "xOther": {
|
|
4814
|
-
* range: [-100, 100]
|
|
4815
|
-
* }
|
|
4816
|
-
* });
|
|
4817
|
-
*
|
|
4818
|
-
* const input1 = new eg.Axes.PanInput("#area1");
|
|
4819
|
-
* const input2 = new eg.Axes.PanInput("#area2");
|
|
4820
|
-
* const input3 = new eg.Axes.PanInput("#area3");
|
|
4821
|
-
*
|
|
4822
|
-
* axes.connect("x", input1);
|
|
4823
|
-
* .connect("x xOther", input2)
|
|
4824
|
-
* .connect(["xOther", "x"], input3);
|
|
4825
|
-
*
|
|
4826
|
-
* axes.disconnect(input1); // disconnects input1
|
|
4827
|
-
* axes.disconnect(); // disconnects all of them
|
|
4828
|
-
* ```
|
|
4805
|
+
/**
|
|
4806
|
+
* Disconnect the axis of eg.Axes from the inputType.
|
|
4807
|
+
* @ko eg.Axes의 축과 inputType의 연결을 끊는다.
|
|
4808
|
+
* @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
|
|
4809
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4810
|
+
* @example
|
|
4811
|
+
* ```js
|
|
4812
|
+
* const axes = new eg.Axes({
|
|
4813
|
+
* "x": {
|
|
4814
|
+
* range: [0, 100]
|
|
4815
|
+
* },
|
|
4816
|
+
* "xOther": {
|
|
4817
|
+
* range: [-100, 100]
|
|
4818
|
+
* }
|
|
4819
|
+
* });
|
|
4820
|
+
*
|
|
4821
|
+
* const input1 = new eg.Axes.PanInput("#area1");
|
|
4822
|
+
* const input2 = new eg.Axes.PanInput("#area2");
|
|
4823
|
+
* const input3 = new eg.Axes.PanInput("#area3");
|
|
4824
|
+
*
|
|
4825
|
+
* axes.connect("x", input1);
|
|
4826
|
+
* .connect("x xOther", input2)
|
|
4827
|
+
* .connect(["xOther", "x"], input3);
|
|
4828
|
+
*
|
|
4829
|
+
* axes.disconnect(input1); // disconnects input1
|
|
4830
|
+
* axes.disconnect(); // disconnects all of them
|
|
4831
|
+
* ```
|
|
4829
4832
|
*/
|
|
4830
4833
|
__proto.disconnect = function (inputType) {
|
|
4831
4834
|
if (inputType) {
|
|
@@ -4842,60 +4845,60 @@ version: 4.12.0-beta.8
|
|
|
4842
4845
|
}
|
|
4843
4846
|
return this;
|
|
4844
4847
|
};
|
|
4845
|
-
/**
|
|
4846
|
-
* Returns the current position of the coordinates.
|
|
4847
|
-
* @ko 좌표의 현재 위치를 반환한다
|
|
4848
|
-
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
4849
|
-
* @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
|
|
4850
|
-
* @example
|
|
4851
|
-
* ```js
|
|
4852
|
-
* const axes = new eg.Axes({
|
|
4853
|
-
* "x": {
|
|
4854
|
-
* range: [0, 100]
|
|
4855
|
-
* },
|
|
4856
|
-
* "xOther": {
|
|
4857
|
-
* range: [-100, 100]
|
|
4858
|
-
* },
|
|
4859
|
-
* "zoom": {
|
|
4860
|
-
* range: [50, 30]
|
|
4861
|
-
* }
|
|
4862
|
-
* });
|
|
4863
|
-
*
|
|
4864
|
-
* axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
|
|
4865
|
-
* axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
|
|
4866
|
-
* ```
|
|
4848
|
+
/**
|
|
4849
|
+
* Returns the current position of the coordinates.
|
|
4850
|
+
* @ko 좌표의 현재 위치를 반환한다
|
|
4851
|
+
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
4852
|
+
* @return {Object.<string, number>} Axis coordinate information <ko>축 좌표 정보</ko>
|
|
4853
|
+
* @example
|
|
4854
|
+
* ```js
|
|
4855
|
+
* const axes = new eg.Axes({
|
|
4856
|
+
* "x": {
|
|
4857
|
+
* range: [0, 100]
|
|
4858
|
+
* },
|
|
4859
|
+
* "xOther": {
|
|
4860
|
+
* range: [-100, 100]
|
|
4861
|
+
* },
|
|
4862
|
+
* "zoom": {
|
|
4863
|
+
* range: [50, 30]
|
|
4864
|
+
* }
|
|
4865
|
+
* });
|
|
4866
|
+
*
|
|
4867
|
+
* axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
|
|
4868
|
+
* axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
|
|
4869
|
+
* ```
|
|
4867
4870
|
*/
|
|
4868
4871
|
__proto.get = function (axes) {
|
|
4869
4872
|
return this.axisManager.get(axes);
|
|
4870
4873
|
};
|
|
4871
|
-
/**
|
|
4872
|
-
* Moves an axis to specific coordinates.
|
|
4873
|
-
* @ko 좌표를 이동한다.
|
|
4874
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4875
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4876
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4877
|
-
* @example
|
|
4878
|
-
* ```js
|
|
4879
|
-
* const axes = new eg.Axes({
|
|
4880
|
-
* "x": {
|
|
4881
|
-
* range: [0, 100]
|
|
4882
|
-
* },
|
|
4883
|
-
* "xOther": {
|
|
4884
|
-
* range: [-100, 100]
|
|
4885
|
-
* },
|
|
4886
|
-
* "zoom": {
|
|
4887
|
-
* range: [50, 30]
|
|
4888
|
-
* }
|
|
4889
|
-
* });
|
|
4890
|
-
*
|
|
4891
|
-
* axes.setTo({"x": 30, "zoom": 60});
|
|
4892
|
-
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4893
|
-
*
|
|
4894
|
-
* axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
|
|
4895
|
-
*
|
|
4896
|
-
* // after 1000 ms
|
|
4897
|
-
* axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
|
|
4898
|
-
* ```
|
|
4874
|
+
/**
|
|
4875
|
+
* Moves an axis to specific coordinates.
|
|
4876
|
+
* @ko 좌표를 이동한다.
|
|
4877
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4878
|
+
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4879
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4880
|
+
* @example
|
|
4881
|
+
* ```js
|
|
4882
|
+
* const axes = new eg.Axes({
|
|
4883
|
+
* "x": {
|
|
4884
|
+
* range: [0, 100]
|
|
4885
|
+
* },
|
|
4886
|
+
* "xOther": {
|
|
4887
|
+
* range: [-100, 100]
|
|
4888
|
+
* },
|
|
4889
|
+
* "zoom": {
|
|
4890
|
+
* range: [50, 30]
|
|
4891
|
+
* }
|
|
4892
|
+
* });
|
|
4893
|
+
*
|
|
4894
|
+
* axes.setTo({"x": 30, "zoom": 60});
|
|
4895
|
+
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4896
|
+
*
|
|
4897
|
+
* axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
|
|
4898
|
+
*
|
|
4899
|
+
* // after 1000 ms
|
|
4900
|
+
* axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
|
|
4901
|
+
* ```
|
|
4899
4902
|
*/
|
|
4900
4903
|
__proto.setTo = function (pos, duration) {
|
|
4901
4904
|
if (duration === void 0) {
|
|
@@ -4904,34 +4907,34 @@ version: 4.12.0-beta.8
|
|
|
4904
4907
|
this.animationManager.setTo(pos, duration);
|
|
4905
4908
|
return this;
|
|
4906
4909
|
};
|
|
4907
|
-
/**
|
|
4908
|
-
* Moves an axis from the current coordinates to specific coordinates.
|
|
4909
|
-
* @ko 현재 좌표를 기준으로 좌표를 이동한다.
|
|
4910
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4911
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4912
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4913
|
-
* @example
|
|
4914
|
-
* ```js
|
|
4915
|
-
* const axes = new eg.Axes({
|
|
4916
|
-
* "x": {
|
|
4917
|
-
* range: [0, 100]
|
|
4918
|
-
* },
|
|
4919
|
-
* "xOther": {
|
|
4920
|
-
* range: [-100, 100]
|
|
4921
|
-
* },
|
|
4922
|
-
* "zoom": {
|
|
4923
|
-
* range: [50, 30]
|
|
4924
|
-
* }
|
|
4925
|
-
* });
|
|
4926
|
-
*
|
|
4927
|
-
* axes.setBy({"x": 30, "zoom": 10});
|
|
4928
|
-
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4929
|
-
*
|
|
4930
|
-
* axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
|
|
4931
|
-
*
|
|
4932
|
-
* // after 1000 ms
|
|
4933
|
-
* axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
|
|
4934
|
-
* ```
|
|
4910
|
+
/**
|
|
4911
|
+
* Moves an axis from the current coordinates to specific coordinates.
|
|
4912
|
+
* @ko 현재 좌표를 기준으로 좌표를 이동한다.
|
|
4913
|
+
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4914
|
+
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4915
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4916
|
+
* @example
|
|
4917
|
+
* ```js
|
|
4918
|
+
* const axes = new eg.Axes({
|
|
4919
|
+
* "x": {
|
|
4920
|
+
* range: [0, 100]
|
|
4921
|
+
* },
|
|
4922
|
+
* "xOther": {
|
|
4923
|
+
* range: [-100, 100]
|
|
4924
|
+
* },
|
|
4925
|
+
* "zoom": {
|
|
4926
|
+
* range: [50, 30]
|
|
4927
|
+
* }
|
|
4928
|
+
* });
|
|
4929
|
+
*
|
|
4930
|
+
* axes.setBy({"x": 30, "zoom": 10});
|
|
4931
|
+
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4932
|
+
*
|
|
4933
|
+
* axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
|
|
4934
|
+
*
|
|
4935
|
+
* // after 1000 ms
|
|
4936
|
+
* axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
|
|
4937
|
+
* ```
|
|
4935
4938
|
*/
|
|
4936
4939
|
__proto.setBy = function (pos, duration) {
|
|
4937
4940
|
if (duration === void 0) {
|
|
@@ -4940,230 +4943,230 @@ version: 4.12.0-beta.8
|
|
|
4940
4943
|
this.animationManager.setBy(pos, duration);
|
|
4941
4944
|
return this;
|
|
4942
4945
|
};
|
|
4943
|
-
/**
|
|
4944
|
-
* Change the options of Axes instance.
|
|
4945
|
-
* @ko 인스턴스의 옵션을 변경한다.
|
|
4946
|
-
* @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
|
|
4947
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4948
|
-
* @example
|
|
4949
|
-
* ```js
|
|
4950
|
-
* const axes = new eg.Axes({
|
|
4951
|
-
* "x": {
|
|
4952
|
-
* range: [0, 100]
|
|
4953
|
-
* },
|
|
4954
|
-
* }, {
|
|
4955
|
-
* round: 10,
|
|
4956
|
-
* });
|
|
4957
|
-
*
|
|
4958
|
-
* axes.setTo({"x": 48});
|
|
4959
|
-
* axes.get(); // {"x": 50}
|
|
4960
|
-
*
|
|
4961
|
-
* axes.setOptions({
|
|
4962
|
-
* round: 1,
|
|
4963
|
-
* });
|
|
4964
|
-
*
|
|
4965
|
-
* axes.setTo({"x": 48});
|
|
4966
|
-
* axes.get(); // {"x": 48}
|
|
4967
|
-
* ```
|
|
4946
|
+
/**
|
|
4947
|
+
* Change the options of Axes instance.
|
|
4948
|
+
* @ko 인스턴스의 옵션을 변경한다.
|
|
4949
|
+
* @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
|
|
4950
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4951
|
+
* @example
|
|
4952
|
+
* ```js
|
|
4953
|
+
* const axes = new eg.Axes({
|
|
4954
|
+
* "x": {
|
|
4955
|
+
* range: [0, 100]
|
|
4956
|
+
* },
|
|
4957
|
+
* }, {
|
|
4958
|
+
* round: 10,
|
|
4959
|
+
* });
|
|
4960
|
+
*
|
|
4961
|
+
* axes.setTo({"x": 48});
|
|
4962
|
+
* axes.get(); // {"x": 50}
|
|
4963
|
+
*
|
|
4964
|
+
* axes.setOptions({
|
|
4965
|
+
* round: 1,
|
|
4966
|
+
* });
|
|
4967
|
+
*
|
|
4968
|
+
* axes.setTo({"x": 48});
|
|
4969
|
+
* axes.get(); // {"x": 48}
|
|
4970
|
+
* ```
|
|
4968
4971
|
*/
|
|
4969
4972
|
__proto.setOptions = function (options) {
|
|
4970
4973
|
this.options = __assign$1(__assign$1({}, this.options), options);
|
|
4971
4974
|
this.animationManager.setOptions(options);
|
|
4972
4975
|
return this;
|
|
4973
4976
|
};
|
|
4974
|
-
/**
|
|
4975
|
-
* Change the information of an existing axis.
|
|
4976
|
-
* @ko 존재하는 축의 정보를 변경한다.
|
|
4977
|
-
* @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
|
|
4978
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4979
|
-
* @example
|
|
4980
|
-
* ```js
|
|
4981
|
-
* const axes = new eg.Axes({
|
|
4982
|
-
* "x": {
|
|
4983
|
-
* range: [0, 100]
|
|
4984
|
-
* },
|
|
4985
|
-
* });
|
|
4986
|
-
*
|
|
4987
|
-
* axes.setTo({"x": 150});
|
|
4988
|
-
* axes.get(); // {"x": 100}
|
|
4989
|
-
*
|
|
4990
|
-
* axes.setAxis({
|
|
4991
|
-
* "x": {
|
|
4992
|
-
* range: [0, 200]
|
|
4993
|
-
* },
|
|
4994
|
-
* });
|
|
4995
|
-
*
|
|
4996
|
-
* axes.setTo({"x": 150});
|
|
4997
|
-
* axes.get(); // {"x": 150}
|
|
4998
|
-
* ```
|
|
4977
|
+
/**
|
|
4978
|
+
* Change the information of an existing axis.
|
|
4979
|
+
* @ko 존재하는 축의 정보를 변경한다.
|
|
4980
|
+
* @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
|
|
4981
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4982
|
+
* @example
|
|
4983
|
+
* ```js
|
|
4984
|
+
* const axes = new eg.Axes({
|
|
4985
|
+
* "x": {
|
|
4986
|
+
* range: [0, 100]
|
|
4987
|
+
* },
|
|
4988
|
+
* });
|
|
4989
|
+
*
|
|
4990
|
+
* axes.setTo({"x": 150});
|
|
4991
|
+
* axes.get(); // {"x": 100}
|
|
4992
|
+
*
|
|
4993
|
+
* axes.setAxis({
|
|
4994
|
+
* "x": {
|
|
4995
|
+
* range: [0, 200]
|
|
4996
|
+
* },
|
|
4997
|
+
* });
|
|
4998
|
+
*
|
|
4999
|
+
* axes.setTo({"x": 150});
|
|
5000
|
+
* axes.get(); // {"x": 150}
|
|
5001
|
+
* ```
|
|
4999
5002
|
*/
|
|
5000
5003
|
__proto.setAxis = function (axis) {
|
|
5001
5004
|
this.axisManager.setAxis(axis);
|
|
5002
5005
|
return this;
|
|
5003
5006
|
};
|
|
5004
|
-
/**
|
|
5005
|
-
* Stop an animation in progress.
|
|
5006
|
-
* @ko 재생 중인 애니메이션을 정지한다.
|
|
5007
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5008
|
-
* @example
|
|
5009
|
-
* ```js
|
|
5010
|
-
* const axes = new eg.Axes({
|
|
5011
|
-
* "x": {
|
|
5012
|
-
* range: [0, 100]
|
|
5013
|
-
* },
|
|
5014
|
-
* });
|
|
5015
|
-
*
|
|
5016
|
-
* axes.setTo({"x": 10}, 1000); // start animatation
|
|
5017
|
-
*
|
|
5018
|
-
* // after 500 ms
|
|
5019
|
-
* axes.stopAnimation(); // stop animation during movement.
|
|
5020
|
-
* ```
|
|
5007
|
+
/**
|
|
5008
|
+
* Stop an animation in progress.
|
|
5009
|
+
* @ko 재생 중인 애니메이션을 정지한다.
|
|
5010
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5011
|
+
* @example
|
|
5012
|
+
* ```js
|
|
5013
|
+
* const axes = new eg.Axes({
|
|
5014
|
+
* "x": {
|
|
5015
|
+
* range: [0, 100]
|
|
5016
|
+
* },
|
|
5017
|
+
* });
|
|
5018
|
+
*
|
|
5019
|
+
* axes.setTo({"x": 10}, 1000); // start animatation
|
|
5020
|
+
*
|
|
5021
|
+
* // after 500 ms
|
|
5022
|
+
* axes.stopAnimation(); // stop animation during movement.
|
|
5023
|
+
* ```
|
|
5021
5024
|
*/
|
|
5022
5025
|
__proto.stopAnimation = function () {
|
|
5023
5026
|
this.animationManager.stopAnimation();
|
|
5024
5027
|
this.animationManager.finish(false);
|
|
5025
5028
|
return this;
|
|
5026
5029
|
};
|
|
5027
|
-
/**
|
|
5028
|
-
* Change the destination of an animation in progress.
|
|
5029
|
-
* @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
|
|
5030
|
-
* @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
5031
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5032
|
-
* @example
|
|
5033
|
-
* ```js
|
|
5034
|
-
* const axes = new eg.Axes({
|
|
5035
|
-
* "x": {
|
|
5036
|
-
* range: [0, 200]
|
|
5037
|
-
* },
|
|
5038
|
-
* "y": {
|
|
5039
|
-
* range: [0, 200]
|
|
5040
|
-
* }
|
|
5041
|
-
* });
|
|
5042
|
-
*
|
|
5043
|
-
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5044
|
-
*
|
|
5045
|
-
* // after 500 ms
|
|
5046
|
-
* axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
|
|
5047
|
-
*
|
|
5048
|
-
* // after 500 ms
|
|
5049
|
-
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5050
|
-
*
|
|
5051
|
-
* // after 700 ms
|
|
5052
|
-
* axes.updateAnimation({destPos: {"x": 100, "y": 100}, duration: 1500, restart: true}); // this works same as axes.setTo({"x": 100, "y": 100}, 800) since restart is true.
|
|
5053
|
-
* ```
|
|
5030
|
+
/**
|
|
5031
|
+
* Change the destination of an animation in progress.
|
|
5032
|
+
* @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
|
|
5033
|
+
* @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
5034
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5035
|
+
* @example
|
|
5036
|
+
* ```js
|
|
5037
|
+
* const axes = new eg.Axes({
|
|
5038
|
+
* "x": {
|
|
5039
|
+
* range: [0, 200]
|
|
5040
|
+
* },
|
|
5041
|
+
* "y": {
|
|
5042
|
+
* range: [0, 200]
|
|
5043
|
+
* }
|
|
5044
|
+
* });
|
|
5045
|
+
*
|
|
5046
|
+
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5047
|
+
*
|
|
5048
|
+
* // after 500 ms
|
|
5049
|
+
* axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
|
|
5050
|
+
*
|
|
5051
|
+
* // after 500 ms
|
|
5052
|
+
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5053
|
+
*
|
|
5054
|
+
* // after 700 ms
|
|
5055
|
+
* 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.
|
|
5056
|
+
* ```
|
|
5054
5057
|
*/
|
|
5055
5058
|
__proto.updateAnimation = function (options) {
|
|
5056
5059
|
this.animationManager.updateAnimation(options);
|
|
5057
5060
|
return this;
|
|
5058
5061
|
};
|
|
5059
|
-
/**
|
|
5060
|
-
* Returns whether there is a coordinate in the bounce area of the target axis.
|
|
5061
|
-
* @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
|
|
5062
|
-
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
5063
|
-
* @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
|
|
5064
|
-
* @example
|
|
5065
|
-
* ```js
|
|
5066
|
-
* const axes = new eg.Axes({
|
|
5067
|
-
* "x": {
|
|
5068
|
-
* range: [0, 100]
|
|
5069
|
-
* },
|
|
5070
|
-
* "xOther": {
|
|
5071
|
-
* range: [-100, 100]
|
|
5072
|
-
* },
|
|
5073
|
-
* "zoom": {
|
|
5074
|
-
* range: [50, 30]
|
|
5075
|
-
* }
|
|
5076
|
-
* });
|
|
5077
|
-
*
|
|
5078
|
-
* axes.isBounceArea(["x"]);
|
|
5079
|
-
* axes.isBounceArea(["x", "zoom"]);
|
|
5080
|
-
* axes.isBounceArea();
|
|
5081
|
-
* ```
|
|
5062
|
+
/**
|
|
5063
|
+
* Returns whether there is a coordinate in the bounce area of the target axis.
|
|
5064
|
+
* @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
|
|
5065
|
+
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
5066
|
+
* @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
|
|
5067
|
+
* @example
|
|
5068
|
+
* ```js
|
|
5069
|
+
* const axes = new eg.Axes({
|
|
5070
|
+
* "x": {
|
|
5071
|
+
* range: [0, 100]
|
|
5072
|
+
* },
|
|
5073
|
+
* "xOther": {
|
|
5074
|
+
* range: [-100, 100]
|
|
5075
|
+
* },
|
|
5076
|
+
* "zoom": {
|
|
5077
|
+
* range: [50, 30]
|
|
5078
|
+
* }
|
|
5079
|
+
* });
|
|
5080
|
+
*
|
|
5081
|
+
* axes.isBounceArea(["x"]);
|
|
5082
|
+
* axes.isBounceArea(["x", "zoom"]);
|
|
5083
|
+
* axes.isBounceArea();
|
|
5084
|
+
* ```
|
|
5082
5085
|
*/
|
|
5083
5086
|
__proto.isBounceArea = function (axes) {
|
|
5084
5087
|
return this.axisManager.isOutside(axes);
|
|
5085
5088
|
};
|
|
5086
|
-
/**
|
|
5087
|
-
* Destroys properties, and events used in a module and disconnect all connections to inputTypes.
|
|
5088
|
-
* @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
|
|
5089
|
+
/**
|
|
5090
|
+
* Destroys properties, and events used in a module and disconnect all connections to inputTypes.
|
|
5091
|
+
* @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
|
|
5089
5092
|
*/
|
|
5090
5093
|
__proto.destroy = function () {
|
|
5091
5094
|
this.disconnect();
|
|
5092
5095
|
this.eventManager.destroy();
|
|
5093
5096
|
};
|
|
5094
|
-
/**
|
|
5095
|
-
* @name VERSION
|
|
5096
|
-
* @desc Version info string
|
|
5097
|
-
* @ko 버전정보 문자열
|
|
5098
|
-
*
|
|
5099
|
-
* @constant
|
|
5100
|
-
* @type {String}
|
|
5101
|
-
* @example
|
|
5102
|
-
* ```js
|
|
5103
|
-
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5104
|
-
* ```
|
|
5097
|
+
/**
|
|
5098
|
+
* @name VERSION
|
|
5099
|
+
* @desc Version info string
|
|
5100
|
+
* @ko 버전정보 문자열
|
|
5101
|
+
*
|
|
5102
|
+
* @constant
|
|
5103
|
+
* @type {String}
|
|
5104
|
+
* @example
|
|
5105
|
+
* ```js
|
|
5106
|
+
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5107
|
+
* ```
|
|
5105
5108
|
*/
|
|
5106
|
-
Axes.VERSION = "3.9.1
|
|
5109
|
+
Axes.VERSION = "3.9.1";
|
|
5107
5110
|
/* eslint-enable */
|
|
5108
|
-
/**
|
|
5109
|
-
* @name TRANSFORM
|
|
5110
|
-
* @desc Returns the transform attribute with CSS vendor prefixes.
|
|
5111
|
-
* @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
|
|
5112
|
-
*
|
|
5113
|
-
* @constant
|
|
5114
|
-
* @type {String}
|
|
5115
|
-
* @example
|
|
5116
|
-
* ```js
|
|
5117
|
-
* eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
|
|
5118
|
-
* ```
|
|
5111
|
+
/**
|
|
5112
|
+
* @name TRANSFORM
|
|
5113
|
+
* @desc Returns the transform attribute with CSS vendor prefixes.
|
|
5114
|
+
* @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
|
|
5115
|
+
*
|
|
5116
|
+
* @constant
|
|
5117
|
+
* @type {String}
|
|
5118
|
+
* @example
|
|
5119
|
+
* ```js
|
|
5120
|
+
* eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
|
|
5121
|
+
* ```
|
|
5119
5122
|
*/
|
|
5120
5123
|
Axes.TRANSFORM = TRANSFORM;
|
|
5121
|
-
/**
|
|
5122
|
-
* @name DIRECTION_NONE
|
|
5123
|
-
* @constant
|
|
5124
|
-
* @type {Number}
|
|
5124
|
+
/**
|
|
5125
|
+
* @name DIRECTION_NONE
|
|
5126
|
+
* @constant
|
|
5127
|
+
* @type {Number}
|
|
5125
5128
|
*/
|
|
5126
5129
|
Axes.DIRECTION_NONE = DIRECTION_NONE;
|
|
5127
|
-
/**
|
|
5128
|
-
* @name DIRECTION_LEFT
|
|
5129
|
-
* @constant
|
|
5130
|
-
* @type {Number}
|
|
5130
|
+
/**
|
|
5131
|
+
* @name DIRECTION_LEFT
|
|
5132
|
+
* @constant
|
|
5133
|
+
* @type {Number}
|
|
5131
5134
|
*/
|
|
5132
5135
|
Axes.DIRECTION_LEFT = DIRECTION_LEFT;
|
|
5133
|
-
/**
|
|
5134
|
-
* @name DIRECTION_RIGHT
|
|
5135
|
-
* @constant
|
|
5136
|
-
* @type {Number}
|
|
5136
|
+
/**
|
|
5137
|
+
* @name DIRECTION_RIGHT
|
|
5138
|
+
* @constant
|
|
5139
|
+
* @type {Number}
|
|
5137
5140
|
*/
|
|
5138
5141
|
Axes.DIRECTION_RIGHT = DIRECTION_RIGHT;
|
|
5139
|
-
/**
|
|
5140
|
-
* @name DIRECTION_UP
|
|
5141
|
-
* @constant
|
|
5142
|
-
* @type {Number}
|
|
5142
|
+
/**
|
|
5143
|
+
* @name DIRECTION_UP
|
|
5144
|
+
* @constant
|
|
5145
|
+
* @type {Number}
|
|
5143
5146
|
*/
|
|
5144
5147
|
Axes.DIRECTION_UP = DIRECTION_UP;
|
|
5145
|
-
/**
|
|
5146
|
-
* @name DIRECTION_DOWN
|
|
5147
|
-
* @constant
|
|
5148
|
-
* @type {Number}
|
|
5148
|
+
/**
|
|
5149
|
+
* @name DIRECTION_DOWN
|
|
5150
|
+
* @constant
|
|
5151
|
+
* @type {Number}
|
|
5149
5152
|
*/
|
|
5150
5153
|
Axes.DIRECTION_DOWN = DIRECTION_DOWN;
|
|
5151
|
-
/**
|
|
5152
|
-
* @name DIRECTION_HORIZONTAL
|
|
5153
|
-
* @constant
|
|
5154
|
-
* @type {Number}
|
|
5154
|
+
/**
|
|
5155
|
+
* @name DIRECTION_HORIZONTAL
|
|
5156
|
+
* @constant
|
|
5157
|
+
* @type {Number}
|
|
5155
5158
|
*/
|
|
5156
5159
|
Axes.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;
|
|
5157
|
-
/**
|
|
5158
|
-
* @name DIRECTION_VERTICAL
|
|
5159
|
-
* @constant
|
|
5160
|
-
* @type {Number}
|
|
5160
|
+
/**
|
|
5161
|
+
* @name DIRECTION_VERTICAL
|
|
5162
|
+
* @constant
|
|
5163
|
+
* @type {Number}
|
|
5161
5164
|
*/
|
|
5162
5165
|
Axes.DIRECTION_VERTICAL = DIRECTION_VERTICAL;
|
|
5163
|
-
/**
|
|
5164
|
-
* @name DIRECTION_ALL
|
|
5165
|
-
* @constant
|
|
5166
|
-
* @type {Number}
|
|
5166
|
+
/**
|
|
5167
|
+
* @name DIRECTION_ALL
|
|
5168
|
+
* @constant
|
|
5169
|
+
* @type {Number}
|
|
5167
5170
|
*/
|
|
5168
5171
|
Axes.DIRECTION_ALL = DIRECTION_ALL;
|
|
5169
5172
|
__decorate([Computed], Axes.prototype, "holding", null);
|
|
@@ -5171,9 +5174,9 @@ version: 4.12.0-beta.8
|
|
|
5171
5174
|
return Axes;
|
|
5172
5175
|
}(Component);
|
|
5173
5176
|
|
|
5174
|
-
/*
|
|
5175
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
5176
|
-
* egjs projects are licensed under the MIT license
|
|
5177
|
+
/*
|
|
5178
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5179
|
+
* egjs projects are licensed under the MIT license
|
|
5177
5180
|
*/
|
|
5178
5181
|
// get user's direction
|
|
5179
5182
|
var getDirectionByAngle = function (angle, thresholdAngle) {
|
|
@@ -5183,73 +5186,73 @@ version: 4.12.0-beta.8
|
|
|
5183
5186
|
var toAngle = Math.abs(angle);
|
|
5184
5187
|
return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
|
|
5185
5188
|
};
|
|
5186
|
-
/**
|
|
5187
|
-
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5188
|
-
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
5189
|
-
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
5190
|
-
* - touch: Touch screen
|
|
5191
|
-
* - mouse: Mouse
|
|
5192
|
-
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
5193
|
-
* - touch: 터치 입력 장치
|
|
5194
|
-
* - mouse: 마우스
|
|
5195
|
-
* - pointer: 마우스 및 터치</ko>
|
|
5196
|
-
* @param {String[]} [inputKey=["any"]] List of key combinations to allow input
|
|
5197
|
-
* - any: any key
|
|
5198
|
-
* - shift: shift key
|
|
5199
|
-
* - ctrl: ctrl key and pinch gesture on the trackpad
|
|
5200
|
-
* - alt: alt key
|
|
5201
|
-
* - meta: meta key
|
|
5202
|
-
* - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
|
|
5203
|
-
* - any: 아무 키
|
|
5204
|
-
* - shift: shift 키
|
|
5205
|
-
* - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
|
|
5206
|
-
* - alt: alt 키
|
|
5207
|
-
* - meta: meta 키
|
|
5208
|
-
* - none: 아무 키도 눌리지 않은 상태 </ko>
|
|
5209
|
-
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
5210
|
-
* - left: Left mouse button and normal touch
|
|
5211
|
-
* - middle: Mouse wheel press
|
|
5212
|
-
* - right: Right mouse button <ko>입력을 허용할 버튼 목록
|
|
5213
|
-
* - left: 마우스 왼쪽 버튼
|
|
5214
|
-
* - middle: 마우스 휠 눌림
|
|
5215
|
-
* - right: 마우스 오른쪽 버튼 </ko>
|
|
5216
|
-
* @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
|
|
5217
|
-
* @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
|
|
5218
|
-
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5219
|
-
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5220
|
-
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5221
|
-
* @param {Boolean} [preventClickOnDrag=false] Whether to cancel the {@link https://developer.mozilla.org/en/docs/Web/API/Element/click_event click} event when the user finishes dragging more than 1 pixel <ko>사용자가 1픽셀 이상 드래그를 마쳤을 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트 취소 여부</ko>
|
|
5222
|
-
* @param {Boolean} [preventDefaultOnDrag=false] Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging <ko>사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부</ko>
|
|
5223
|
-
* @param {Number} [iOSEdgeSwipeThreshold=30] Area (px) that can go to the next page when swiping the right edge in iOS safari <ko>iOS Safari에서 오른쪽 엣지를 스와이프 하는 경우 다음 페이지로 넘어갈 수 있는 영역(px)</ko>
|
|
5224
|
-
* @param {String} [touchAction=null] Value that overrides the element's "touch-action" css property. If set to null, it is automatically set to prevent scrolling in the direction of the connected axis. <ko>엘리먼트의 "touch-action" CSS 속성을 덮어쓰는 값. 만약 null로 설정된 경우, 연결된 축 방향으로의 스크롤을 방지하게끔 자동으로 설정된다.</ko>
|
|
5189
|
+
/**
|
|
5190
|
+
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5191
|
+
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
5192
|
+
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
5193
|
+
* - touch: Touch screen
|
|
5194
|
+
* - mouse: Mouse
|
|
5195
|
+
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
5196
|
+
* - touch: 터치 입력 장치
|
|
5197
|
+
* - mouse: 마우스
|
|
5198
|
+
* - pointer: 마우스 및 터치</ko>
|
|
5199
|
+
* @param {String[]} [inputKey=["any"]] List of key combinations to allow input
|
|
5200
|
+
* - any: any key
|
|
5201
|
+
* - shift: shift key
|
|
5202
|
+
* - ctrl: ctrl key and pinch gesture on the trackpad
|
|
5203
|
+
* - alt: alt key
|
|
5204
|
+
* - meta: meta key
|
|
5205
|
+
* - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
|
|
5206
|
+
* - any: 아무 키
|
|
5207
|
+
* - shift: shift 키
|
|
5208
|
+
* - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
|
|
5209
|
+
* - alt: alt 키
|
|
5210
|
+
* - meta: meta 키
|
|
5211
|
+
* - none: 아무 키도 눌리지 않은 상태 </ko>
|
|
5212
|
+
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
5213
|
+
* - left: Left mouse button and normal touch
|
|
5214
|
+
* - middle: Mouse wheel press
|
|
5215
|
+
* - right: Right mouse button <ko>입력을 허용할 버튼 목록
|
|
5216
|
+
* - left: 마우스 왼쪽 버튼
|
|
5217
|
+
* - middle: 마우스 휠 눌림
|
|
5218
|
+
* - right: 마우스 오른쪽 버튼 </ko>
|
|
5219
|
+
* @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
|
|
5220
|
+
* @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
|
|
5221
|
+
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5222
|
+
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5223
|
+
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5224
|
+
* @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>
|
|
5225
|
+
* @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>
|
|
5226
|
+
* @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>
|
|
5227
|
+
* @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>
|
|
5225
5228
|
**/
|
|
5226
|
-
/**
|
|
5227
|
-
* A module that passes the amount of change to eg.Axes when the mouse or touchscreen is down and moved. use less than two axes.
|
|
5228
|
-
* @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
|
|
5229
|
-
*
|
|
5230
|
-
* @example
|
|
5231
|
-
* ```js
|
|
5232
|
-
* const pan = new eg.Axes.PanInput("#area", {
|
|
5233
|
-
* inputType: ["touch"],
|
|
5234
|
-
* scale: [1, 1.3],
|
|
5235
|
-
* });
|
|
5236
|
-
*
|
|
5237
|
-
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5238
|
-
* // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5239
|
-
* axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
|
|
5240
|
-
*
|
|
5241
|
-
* // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5242
|
-
* axes.connect(["something1"], pan); // or axes.connect("something1", pan);
|
|
5243
|
-
*
|
|
5244
|
-
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5245
|
-
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5246
|
-
* ```
|
|
5247
|
-
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5248
|
-
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5229
|
+
/**
|
|
5230
|
+
* 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.
|
|
5231
|
+
* @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
|
|
5232
|
+
*
|
|
5233
|
+
* @example
|
|
5234
|
+
* ```js
|
|
5235
|
+
* const pan = new eg.Axes.PanInput("#area", {
|
|
5236
|
+
* inputType: ["touch"],
|
|
5237
|
+
* scale: [1, 1.3],
|
|
5238
|
+
* });
|
|
5239
|
+
*
|
|
5240
|
+
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5241
|
+
* // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5242
|
+
* axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
|
|
5243
|
+
*
|
|
5244
|
+
* // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5245
|
+
* axes.connect(["something1"], pan); // or axes.connect("something1", pan);
|
|
5246
|
+
*
|
|
5247
|
+
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5248
|
+
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5249
|
+
* ```
|
|
5250
|
+
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5251
|
+
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5249
5252
|
*/
|
|
5250
5253
|
var PanInput = /*#__PURE__*/function () {
|
|
5251
|
-
/**
|
|
5252
|
-
*
|
|
5254
|
+
/**
|
|
5255
|
+
*
|
|
5253
5256
|
*/
|
|
5254
5257
|
function PanInput(el, options) {
|
|
5255
5258
|
var _this = this;
|
|
@@ -5306,18 +5309,18 @@ version: 4.12.0-beta.8
|
|
|
5306
5309
|
this._direction = DIRECTION_NONE;
|
|
5307
5310
|
return this;
|
|
5308
5311
|
};
|
|
5309
|
-
/**
|
|
5310
|
-
* Destroys elements, properties, and events used in a module.
|
|
5311
|
-
* @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
|
|
5312
|
+
/**
|
|
5313
|
+
* Destroys elements, properties, and events used in a module.
|
|
5314
|
+
* @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
|
|
5312
5315
|
*/
|
|
5313
5316
|
__proto.destroy = function () {
|
|
5314
5317
|
this.disconnect();
|
|
5315
5318
|
this.element = null;
|
|
5316
5319
|
};
|
|
5317
|
-
/**
|
|
5318
|
-
* Enables input devices
|
|
5319
|
-
* @ko 입력 장치를 사용할 수 있게 한다
|
|
5320
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5320
|
+
/**
|
|
5321
|
+
* Enables input devices
|
|
5322
|
+
* @ko 입력 장치를 사용할 수 있게 한다
|
|
5323
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5321
5324
|
*/
|
|
5322
5325
|
__proto.enable = function () {
|
|
5323
5326
|
if (!this._enabled) {
|
|
@@ -5326,10 +5329,10 @@ version: 4.12.0-beta.8
|
|
|
5326
5329
|
}
|
|
5327
5330
|
return this;
|
|
5328
5331
|
};
|
|
5329
|
-
/**
|
|
5330
|
-
* Disables input devices
|
|
5331
|
-
* @ko 입력 장치를 사용할 수 없게 한다.
|
|
5332
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5332
|
+
/**
|
|
5333
|
+
* Disables input devices
|
|
5334
|
+
* @ko 입력 장치를 사용할 수 없게 한다.
|
|
5335
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5333
5336
|
*/
|
|
5334
5337
|
__proto.disable = function () {
|
|
5335
5338
|
if (this._enabled) {
|
|
@@ -5340,18 +5343,18 @@ version: 4.12.0-beta.8
|
|
|
5340
5343
|
}
|
|
5341
5344
|
return this;
|
|
5342
5345
|
};
|
|
5343
|
-
/**
|
|
5344
|
-
* Returns whether to use an input device
|
|
5345
|
-
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5346
|
-
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5346
|
+
/**
|
|
5347
|
+
* Returns whether to use an input device
|
|
5348
|
+
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5349
|
+
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5347
5350
|
*/
|
|
5348
5351
|
__proto.isEnabled = function () {
|
|
5349
5352
|
return this._enabled;
|
|
5350
5353
|
};
|
|
5351
|
-
/**
|
|
5352
|
-
* Releases current user input.
|
|
5353
|
-
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5354
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5354
|
+
/**
|
|
5355
|
+
* Releases current user input.
|
|
5356
|
+
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5357
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5355
5358
|
*/
|
|
5356
5359
|
__proto.release = function () {
|
|
5357
5360
|
var activeEvent = this._activeEvent;
|
|
@@ -5524,9 +5527,9 @@ version: 4.12.0-beta.8
|
|
|
5524
5527
|
return PanInput;
|
|
5525
5528
|
}();
|
|
5526
5529
|
|
|
5527
|
-
/*
|
|
5528
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
5529
|
-
* egjs projects are licensed under the MIT license
|
|
5530
|
+
/*
|
|
5531
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5532
|
+
* egjs projects are licensed under the MIT license
|
|
5530
5533
|
*/
|
|
5531
5534
|
|
|
5532
5535
|
var Axes$1 = Axes;
|
|
@@ -5805,6 +5808,9 @@ version: 4.12.0-beta.8
|
|
|
5805
5808
|
axesEvent = ctx.axesEvent,
|
|
5806
5809
|
transitTo = ctx.transitTo;
|
|
5807
5810
|
var inputEvent = axesEvent.inputEvent;
|
|
5811
|
+
if (!inputEvent) {
|
|
5812
|
+
return;
|
|
5813
|
+
}
|
|
5808
5814
|
var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY;
|
|
5809
5815
|
var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
|
|
5810
5816
|
isTrusted: axesEvent.isTrusted,
|
|
@@ -7980,6 +7986,7 @@ version: 4.12.0-beta.8
|
|
|
7980
7986
|
var _this = this;
|
|
7981
7987
|
var _b = (_a === void 0 ? {} : _a).align,
|
|
7982
7988
|
align = _b === void 0 ? ALIGN.CENTER : _b;
|
|
7989
|
+
this._lookedOffset = 0;
|
|
7983
7990
|
this._checkTranslateSupport = function () {
|
|
7984
7991
|
var e_1, _a;
|
|
7985
7992
|
var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
|
|
@@ -8339,6 +8346,8 @@ version: 4.12.0-beta.8
|
|
|
8339
8346
|
*/
|
|
8340
8347
|
__proto.lookAt = function (pos) {
|
|
8341
8348
|
var _this = this;
|
|
8349
|
+
var prevOffset = this._offset;
|
|
8350
|
+
var isChangedOffset = this._lookedOffset !== prevOffset;
|
|
8342
8351
|
var flicking = getFlickingAttached(this._flicking);
|
|
8343
8352
|
var prevPos = this._position;
|
|
8344
8353
|
this._position = pos;
|
|
@@ -8349,7 +8358,12 @@ version: 4.12.0-beta.8
|
|
|
8349
8358
|
if (toggled) {
|
|
8350
8359
|
void flicking.renderer.render().then(function () {
|
|
8351
8360
|
_this.updateOffset();
|
|
8361
|
+
_this._lookedOffset = _this._offset;
|
|
8352
8362
|
});
|
|
8363
|
+
} else if (isChangedOffset) {
|
|
8364
|
+
// sync offset for renderOnlyVisible on resize
|
|
8365
|
+
this.updateOffset();
|
|
8366
|
+
this._lookedOffset = this._offset;
|
|
8353
8367
|
} else {
|
|
8354
8368
|
this.applyTransform();
|
|
8355
8369
|
}
|
|
@@ -8524,8 +8538,8 @@ version: 4.12.0-beta.8
|
|
|
8524
8538
|
return this;
|
|
8525
8539
|
};
|
|
8526
8540
|
/**
|
|
8527
|
-
* Update Viewport's height to
|
|
8528
|
-
* @ko 현재
|
|
8541
|
+
* Update Viewport's height to visible panel's max height
|
|
8542
|
+
* @ko 현재 활성화된 패널과 보이는 패널의 최대 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
|
|
8529
8543
|
* @throws {FlickingError}
|
|
8530
8544
|
* {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
|
|
8531
8545
|
* <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
|
|
@@ -8535,9 +8549,17 @@ version: 4.12.0-beta.8
|
|
|
8535
8549
|
__proto.updateAdaptiveHeight = function () {
|
|
8536
8550
|
var flicking = getFlickingAttached(this._flicking);
|
|
8537
8551
|
var activePanel = flicking.control.activePanel;
|
|
8538
|
-
|
|
8552
|
+
var visiblePanels = flicking.visiblePanels;
|
|
8553
|
+
var selectedPanels = __spread$1(visiblePanels);
|
|
8554
|
+
if (activePanel) {
|
|
8555
|
+
selectedPanels.push(activePanel);
|
|
8556
|
+
}
|
|
8557
|
+
if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
|
|
8558
|
+
var maxHeight = Math.max.apply(Math, __spread$1(selectedPanels.map(function (panel) {
|
|
8559
|
+
return panel.height;
|
|
8560
|
+
})));
|
|
8539
8561
|
flicking.viewport.setSize({
|
|
8540
|
-
height:
|
|
8562
|
+
height: maxHeight
|
|
8541
8563
|
});
|
|
8542
8564
|
};
|
|
8543
8565
|
/**
|
|
@@ -8608,6 +8630,7 @@ version: 4.12.0-beta.8
|
|
|
8608
8630
|
};
|
|
8609
8631
|
__proto._resetInternalValues = function () {
|
|
8610
8632
|
this._position = 0;
|
|
8633
|
+
this._lookedOffset = 0;
|
|
8611
8634
|
this._alignPos = 0;
|
|
8612
8635
|
this._offset = 0;
|
|
8613
8636
|
this._circularOffset = 0;
|
|
@@ -10551,6 +10574,9 @@ version: 4.12.0-beta.8
|
|
|
10551
10574
|
var flicking = this._flicking;
|
|
10552
10575
|
var horizontal = flicking.horizontal,
|
|
10553
10576
|
useFractionalSize = flicking.useFractionalSize;
|
|
10577
|
+
if (!el) {
|
|
10578
|
+
return this;
|
|
10579
|
+
}
|
|
10554
10580
|
if (cached) {
|
|
10555
10581
|
this._size = cached.size;
|
|
10556
10582
|
this._margin = __assign$2({}, cached.margin);
|
|
@@ -12972,7 +12998,7 @@ version: 4.12.0-beta.8
|
|
|
12972
12998
|
var defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);
|
|
12973
12999
|
if (!defaultPanel) return;
|
|
12974
13000
|
var nearestAnchor = camera.findNearestAnchor(defaultPanel.position);
|
|
12975
|
-
var initialPanel = nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel;
|
|
13001
|
+
var initialPanel = nearestAnchor && defaultPanel.position !== nearestAnchor.panel.position && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel;
|
|
12976
13002
|
control.setActive(initialPanel, null, false);
|
|
12977
13003
|
if (!nearestAnchor) {
|
|
12978
13004
|
throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), CODE.POSITION_NOT_REACHABLE);
|
|
@@ -13026,103 +13052,146 @@ version: 4.12.0-beta.8
|
|
|
13026
13052
|
* Flicking.VERSION; // ex) 4.0.0
|
|
13027
13053
|
* ```
|
|
13028
13054
|
*/
|
|
13029
|
-
Flicking.VERSION = "4.12.0
|
|
13055
|
+
Flicking.VERSION = "4.12.0";
|
|
13030
13056
|
return Flicking;
|
|
13031
13057
|
}(Component);
|
|
13032
13058
|
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13059
|
+
var SIDE_EVENTS = {
|
|
13060
|
+
HOLD_START: "sideHoldStart",
|
|
13061
|
+
HOLD_END: "sideHoldEnd",
|
|
13062
|
+
MOVE_START: "sideMoveStart",
|
|
13063
|
+
MOVE: "sideMove",
|
|
13064
|
+
MOVE_END: "sideMoveEnd",
|
|
13065
|
+
WILL_CHANGE: "sideWillChange",
|
|
13066
|
+
CHANGED: "sideChanged",
|
|
13067
|
+
WILL_RESTORE: "sideWillRestore",
|
|
13068
|
+
RESTORED: "sideRestored"
|
|
13069
|
+
};
|
|
13037
13070
|
var CrossFlicking = /*#__PURE__*/function (_super) {
|
|
13038
13071
|
__extends$3(CrossFlicking, _super);
|
|
13039
13072
|
function CrossFlicking(root, options) {
|
|
13040
|
-
if (options === void 0) {
|
|
13041
|
-
options = {
|
|
13042
|
-
sideOptions: {},
|
|
13043
|
-
preserveIndex: false,
|
|
13044
|
-
disableSlideOnHold: false,
|
|
13045
|
-
disableIndexSync: false
|
|
13046
|
-
};
|
|
13047
|
-
}
|
|
13048
13073
|
var _this = _super.call(this, root, options) || this;
|
|
13074
|
+
_this._syncToCategory = function (index, outerIndex) {
|
|
13075
|
+
if (_this._disableIndexSync) {
|
|
13076
|
+
return;
|
|
13077
|
+
}
|
|
13078
|
+
_this.stopAnimation();
|
|
13079
|
+
_this._sideFlicking.forEach(function (child, i) {
|
|
13080
|
+
var _a = _this._sideState[i],
|
|
13081
|
+
start = _a.start,
|
|
13082
|
+
end = _a.end;
|
|
13083
|
+
if (start <= index && end >= index && outerIndex !== i) {
|
|
13084
|
+
child.stopAnimation();
|
|
13085
|
+
void child.moveTo(index, 0);
|
|
13086
|
+
void _this.moveTo(i, 0);
|
|
13087
|
+
}
|
|
13088
|
+
});
|
|
13089
|
+
};
|
|
13090
|
+
_this._setDraggable = function (direction, draggable) {
|
|
13091
|
+
if (!_this._disableSlideOnHold) {
|
|
13092
|
+
return;
|
|
13093
|
+
}
|
|
13094
|
+
var dragThreshold = _this._originalDragThreshold;
|
|
13095
|
+
var threshold = draggable ? dragThreshold && dragThreshold >= 10 ? dragThreshold : 10 : Infinity;
|
|
13096
|
+
if (direction === MOVE_DIRECTION.HORIZONTAL === _this.horizontal) {
|
|
13097
|
+
_this.dragThreshold = threshold;
|
|
13098
|
+
} else if (direction === MOVE_DIRECTION.VERTICAL === _this.horizontal) {
|
|
13099
|
+
_this._sideFlicking.forEach(function (child) {
|
|
13100
|
+
child.dragThreshold = threshold;
|
|
13101
|
+
});
|
|
13102
|
+
}
|
|
13103
|
+
};
|
|
13104
|
+
_this._setPreviousSideIndex = function () {
|
|
13105
|
+
_this._sideFlicking.forEach(function (child, i) {
|
|
13106
|
+
var _a = _this._sideState[i],
|
|
13107
|
+
start = _a.start,
|
|
13108
|
+
end = _a.end;
|
|
13109
|
+
if (_this._preserveIndex) {
|
|
13110
|
+
if (_this._nextIndex !== i) {
|
|
13111
|
+
if (child.index < start) {
|
|
13112
|
+
child.stopAnimation();
|
|
13113
|
+
void child.moveTo(start, 0);
|
|
13114
|
+
} else if (child.index > end) {
|
|
13115
|
+
child.stopAnimation();
|
|
13116
|
+
void child.moveTo(end, 0);
|
|
13117
|
+
}
|
|
13118
|
+
}
|
|
13119
|
+
} else {
|
|
13120
|
+
if (_this._nextIndex !== i) {
|
|
13121
|
+
void child.moveTo(start, 0);
|
|
13122
|
+
}
|
|
13123
|
+
}
|
|
13124
|
+
});
|
|
13125
|
+
};
|
|
13126
|
+
_this._addSideIndex = function (e) {
|
|
13127
|
+
e.sideIndex = _this._sideFlicking[e.index].index;
|
|
13128
|
+
};
|
|
13049
13129
|
_this._onHorizontalHoldStart = function () {
|
|
13050
|
-
_this.
|
|
13130
|
+
_this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
|
|
13051
13131
|
_this._moveDirection = null;
|
|
13052
13132
|
};
|
|
13053
13133
|
_this._onHorizontalMove = function (e) {
|
|
13054
13134
|
if (e.isTrusted && !_this._moveDirection) {
|
|
13055
|
-
_this.
|
|
13056
|
-
child.dragThreshold = Infinity;
|
|
13057
|
-
});
|
|
13135
|
+
_this._setDraggable(MOVE_DIRECTION.VERTICAL, false);
|
|
13058
13136
|
_this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
|
|
13059
13137
|
}
|
|
13060
13138
|
};
|
|
13061
13139
|
_this._onHorizontalMoveEnd = function (e) {
|
|
13062
13140
|
var visiblePanels = _this.visiblePanels;
|
|
13063
|
-
_this._sideFlicking.forEach(function (child) {
|
|
13064
|
-
child.dragThreshold = 10;
|
|
13065
|
-
});
|
|
13066
|
-
_this._moveDirection = null;
|
|
13067
13141
|
if (visiblePanels.length > 1) {
|
|
13068
13142
|
_this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
|
|
13069
13143
|
} else {
|
|
13070
13144
|
_this._nextIndex = visiblePanels[0].index;
|
|
13071
13145
|
}
|
|
13146
|
+
_this._setDraggable(MOVE_DIRECTION.VERTICAL, true);
|
|
13147
|
+
_this._moveDirection = null;
|
|
13072
13148
|
// _syncToCategory에서 완전히 가로 이동이 이루어지기 전에 세로 방향 index가 변하는 경우가 있어 requestAnimationFrame 처리
|
|
13073
13149
|
requestAnimationFrame(function () {
|
|
13074
|
-
_this.
|
|
13075
|
-
if (_this._nextIndex !== i) {
|
|
13076
|
-
var _a = _this._sideState[i],
|
|
13077
|
-
start = _a.start,
|
|
13078
|
-
end = _a.end;
|
|
13079
|
-
if (child.index < start) {
|
|
13080
|
-
child.stopAnimation();
|
|
13081
|
-
void child.moveTo(start, 0);
|
|
13082
|
-
} else if (child.index > end) {
|
|
13083
|
-
child.stopAnimation();
|
|
13084
|
-
void child.moveTo(end, 0);
|
|
13085
|
-
}
|
|
13086
|
-
}
|
|
13087
|
-
});
|
|
13150
|
+
return _this._setPreviousSideIndex();
|
|
13088
13151
|
});
|
|
13089
13152
|
if (e.isTrusted) {
|
|
13090
13153
|
_this._syncToCategory(_this._sideFlicking[_this._nextIndex].index, _this._nextIndex);
|
|
13091
13154
|
}
|
|
13092
13155
|
};
|
|
13093
13156
|
_this._onSideHoldStart = function () {
|
|
13094
|
-
_this.
|
|
13095
|
-
child.dragThreshold = 10;
|
|
13096
|
-
});
|
|
13157
|
+
_this._setDraggable(MOVE_DIRECTION.VERTICAL, true);
|
|
13097
13158
|
_this._moveDirection = null;
|
|
13098
13159
|
};
|
|
13099
13160
|
_this._onSideMove = function (e) {
|
|
13100
13161
|
if (e.isTrusted && !_this._moveDirection) {
|
|
13101
|
-
_this.
|
|
13162
|
+
_this._setDraggable(MOVE_DIRECTION.HORIZONTAL, false);
|
|
13102
13163
|
_this._moveDirection = MOVE_DIRECTION.VERTICAL;
|
|
13103
13164
|
}
|
|
13104
13165
|
};
|
|
13105
13166
|
_this._onSideMoveEnd = function () {
|
|
13106
|
-
_this.
|
|
13167
|
+
_this._setDraggable(MOVE_DIRECTION.HORIZONTAL, true);
|
|
13107
13168
|
_this._moveDirection = null;
|
|
13108
13169
|
};
|
|
13109
13170
|
_this._onSideChanged = function (e) {
|
|
13110
|
-
// this.visiblePanels.length
|
|
13111
|
-
//
|
|
13171
|
+
// If this.visiblePanels.length >= 2, it means that horizontal flicking is being dragged.
|
|
13172
|
+
// In this case, syncToCategory in _onHorizontalMoveEnd will fire after moving finishes, so we don't fire it here.
|
|
13112
13173
|
if (_this.visiblePanels.length < 2 && _this._sideFlicking[_this.index] === e.currentTarget) {
|
|
13113
13174
|
_this._syncToCategory(e.index, _this.index);
|
|
13114
13175
|
}
|
|
13115
13176
|
};
|
|
13177
|
+
var _a = options.sideOptions,
|
|
13178
|
+
sideOptions = _a === void 0 ? {} : _a,
|
|
13179
|
+
_b = options.preserveIndex,
|
|
13180
|
+
preserveIndex = _b === void 0 ? true : _b,
|
|
13181
|
+
_c = options.disableSlideOnHold,
|
|
13182
|
+
disableSlideOnHold = _c === void 0 ? true : _c,
|
|
13183
|
+
_d = options.disableIndexSync,
|
|
13184
|
+
disableIndexSync = _d === void 0 ? false : _d;
|
|
13116
13185
|
// Internal states
|
|
13117
13186
|
_this._moveDirection = null;
|
|
13118
13187
|
_this._nextIndex = 0;
|
|
13188
|
+
_this._originalDragThreshold = _this.dragThreshold;
|
|
13119
13189
|
// Bind options
|
|
13120
|
-
_this._sideOptions =
|
|
13121
|
-
_this._preserveIndex =
|
|
13122
|
-
_this._disableSlideOnHold =
|
|
13123
|
-
_this._disableIndexSync =
|
|
13190
|
+
_this._sideOptions = sideOptions;
|
|
13191
|
+
_this._preserveIndex = preserveIndex;
|
|
13192
|
+
_this._disableSlideOnHold = disableSlideOnHold;
|
|
13193
|
+
_this._disableIndexSync = disableIndexSync;
|
|
13124
13194
|
return _this;
|
|
13125
|
-
// Create core components
|
|
13126
13195
|
}
|
|
13127
13196
|
var __proto = CrossFlicking.prototype;
|
|
13128
13197
|
Object.defineProperty(__proto, "sideFlicking", {
|
|
@@ -13133,6 +13202,15 @@ version: 4.12.0-beta.8
|
|
|
13133
13202
|
enumerable: false,
|
|
13134
13203
|
configurable: true
|
|
13135
13204
|
});
|
|
13205
|
+
Object.defineProperty(__proto, "sideIndex", {
|
|
13206
|
+
get: function () {
|
|
13207
|
+
return this._sideFlicking.map(function (i) {
|
|
13208
|
+
return i.index;
|
|
13209
|
+
});
|
|
13210
|
+
},
|
|
13211
|
+
enumerable: false,
|
|
13212
|
+
configurable: true
|
|
13213
|
+
});
|
|
13136
13214
|
Object.defineProperty(__proto, "sideState", {
|
|
13137
13215
|
get: function () {
|
|
13138
13216
|
return this._sideState;
|
|
@@ -13191,7 +13269,9 @@ version: 4.12.0-beta.8
|
|
|
13191
13269
|
});
|
|
13192
13270
|
};
|
|
13193
13271
|
__proto.destroy = function () {
|
|
13194
|
-
|
|
13272
|
+
this._sideFlicking.forEach(function (flicking) {
|
|
13273
|
+
flicking.destroy();
|
|
13274
|
+
});
|
|
13195
13275
|
_super.prototype.destroy.call(this);
|
|
13196
13276
|
};
|
|
13197
13277
|
__proto._addComponentEvents = function () {
|
|
@@ -13199,80 +13279,83 @@ version: 4.12.0-beta.8
|
|
|
13199
13279
|
this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
|
|
13200
13280
|
this.on(EVENTS.MOVE, this._onHorizontalMove);
|
|
13201
13281
|
this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
|
|
13202
|
-
|
|
13282
|
+
[EVENTS.CHANGED, EVENTS.WILL_CHANGE].forEach(function (event) {
|
|
13283
|
+
_this.on(event, _this._addSideIndex);
|
|
13284
|
+
});
|
|
13285
|
+
this._sideFlicking.forEach(function (flicking, mainIndex) {
|
|
13203
13286
|
flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
|
|
13204
13287
|
flicking.on(EVENTS.MOVE, _this._onSideMove);
|
|
13205
13288
|
flicking.on(EVENTS.MOVE_END, _this._onSideMoveEnd);
|
|
13206
13289
|
flicking.on(EVENTS.CHANGED, _this._onSideChanged);
|
|
13290
|
+
Object.keys(SIDE_EVENTS).forEach(function (name) {
|
|
13291
|
+
flicking.on(EVENTS[name], function (event) {
|
|
13292
|
+
_this.trigger(new ComponentEvent$1(SIDE_EVENTS[name], __assign$2({
|
|
13293
|
+
mainIndex: mainIndex
|
|
13294
|
+
}, event)));
|
|
13295
|
+
});
|
|
13296
|
+
});
|
|
13207
13297
|
});
|
|
13208
13298
|
};
|
|
13209
|
-
__proto._getGroupFromAttribute = function (panels) {
|
|
13210
|
-
var groupKeys = [];
|
|
13211
|
-
var groupPanels = {};
|
|
13212
|
-
panels.forEach(function (panel) {
|
|
13213
|
-
var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
|
|
13214
|
-
if (groupKey && !includes(groupKeys, groupKey)) {
|
|
13215
|
-
groupKeys.push(groupKey);
|
|
13216
|
-
groupPanels[groupKey] = [panel];
|
|
13217
|
-
} else if (groupKey) {
|
|
13218
|
-
groupPanels[groupKey].push(panel);
|
|
13219
|
-
}
|
|
13220
|
-
});
|
|
13221
|
-
return groupPanels;
|
|
13222
|
-
};
|
|
13223
13299
|
__proto._createSideState = function () {
|
|
13224
|
-
var _this = this;
|
|
13225
13300
|
var viewportEl = this.element;
|
|
13226
13301
|
var cameraEl = this.camera.element;
|
|
13227
13302
|
var panels = toArray$2(cameraEl.children);
|
|
13228
|
-
var sideState = [];
|
|
13229
|
-
var sidePanels = "";
|
|
13230
|
-
// check data attribute exists
|
|
13231
|
-
var sideCamera = document.createElement("div");
|
|
13232
|
-
sideCamera.classList.add(CLASS.CAMERA);
|
|
13233
13303
|
var isCrossStructure = getDataAttributes(viewportEl, "data-cross-").structure;
|
|
13304
|
+
var sideState = [];
|
|
13234
13305
|
if (!isCrossStructure) {
|
|
13235
|
-
viewportEl.setAttribute("data-cross-structure", "true");
|
|
13236
13306
|
var groupPanels = this._getGroupFromAttribute(panels);
|
|
13237
13307
|
var groupKeys = Object.keys(groupPanels);
|
|
13238
13308
|
if (groupKeys.length) {
|
|
13239
13309
|
sideState = this._getSideStateFromGroup(groupPanels);
|
|
13240
13310
|
this.remove(0, this.panelCount - groupKeys.length);
|
|
13241
|
-
sideState.forEach(function (state, i) {
|
|
13242
|
-
var panel = _this.camera.children[i];
|
|
13243
|
-
sidePanels += state.element.innerHTML;
|
|
13244
|
-
Array.from(panel.attributes).forEach(function (attribute) {
|
|
13245
|
-
return panel.removeAttribute(attribute.name);
|
|
13246
|
-
});
|
|
13247
|
-
});
|
|
13248
13311
|
} else {
|
|
13249
|
-
sideState =
|
|
13250
|
-
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13251
|
-
sidePanels += panel.innerHTML;
|
|
13252
|
-
return __spread$1(state, [{
|
|
13253
|
-
key: i.toString(),
|
|
13254
|
-
start: start,
|
|
13255
|
-
end: start + panel.children.length - 1,
|
|
13256
|
-
element: panel
|
|
13257
|
-
}]);
|
|
13258
|
-
}, []);
|
|
13312
|
+
sideState = this._getSideStateFromPanels(panels);
|
|
13259
13313
|
}
|
|
13260
|
-
|
|
13261
|
-
sideState.forEach(function (_, i) {
|
|
13262
|
-
var panel = _this.camera.children[i];
|
|
13263
|
-
[CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
|
|
13264
|
-
if (!panel.classList.contains(className)) {
|
|
13265
|
-
panel.classList.add(className);
|
|
13266
|
-
}
|
|
13267
|
-
});
|
|
13268
|
-
panel.innerHTML = sideCamera.outerHTML;
|
|
13269
|
-
});
|
|
13314
|
+
this._createCrossStructure(sideState);
|
|
13270
13315
|
} else {
|
|
13271
|
-
sideState = this.
|
|
13316
|
+
sideState = this._getSideStateFromCrossStructure(panels);
|
|
13272
13317
|
}
|
|
13273
13318
|
void this.resize();
|
|
13274
13319
|
return sideState;
|
|
13275
13320
|
};
|
|
13321
|
+
__proto._createCrossStructure = function (sideState) {
|
|
13322
|
+
var _this = this;
|
|
13323
|
+
var sideCamera = document.createElement("div");
|
|
13324
|
+
var sidePanels = "";
|
|
13325
|
+
sideCamera.classList.add(CLASS.CAMERA);
|
|
13326
|
+
sideState.forEach(function (state, i) {
|
|
13327
|
+
var panel = _this.camera.children[i];
|
|
13328
|
+
sidePanels += state.element.innerHTML;
|
|
13329
|
+
Array.from(panel.attributes).forEach(function (attribute) {
|
|
13330
|
+
return panel.removeAttribute(attribute.name);
|
|
13331
|
+
});
|
|
13332
|
+
});
|
|
13333
|
+
sideCamera.innerHTML = sidePanels;
|
|
13334
|
+
sideState.forEach(function (_, i) {
|
|
13335
|
+
var panel = _this.camera.children[i];
|
|
13336
|
+
[CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
|
|
13337
|
+
if (!panel.classList.contains(className)) {
|
|
13338
|
+
panel.classList.add(className);
|
|
13339
|
+
}
|
|
13340
|
+
});
|
|
13341
|
+
panel.innerHTML = sideCamera.outerHTML;
|
|
13342
|
+
});
|
|
13343
|
+
this.element.setAttribute("data-cross-structure", "true");
|
|
13344
|
+
};
|
|
13345
|
+
__proto._getGroupFromAttribute = function (panels) {
|
|
13346
|
+
var groupKeys = [];
|
|
13347
|
+
var groupPanels = {};
|
|
13348
|
+
panels.forEach(function (panel) {
|
|
13349
|
+
var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
|
|
13350
|
+
if (groupKey && !includes(groupKeys, groupKey)) {
|
|
13351
|
+
groupKeys.push(groupKey);
|
|
13352
|
+
groupPanels[groupKey] = [panel];
|
|
13353
|
+
} else if (groupKey) {
|
|
13354
|
+
groupPanels[groupKey].push(panel);
|
|
13355
|
+
}
|
|
13356
|
+
});
|
|
13357
|
+
return groupPanels;
|
|
13358
|
+
};
|
|
13276
13359
|
__proto._getSideStateFromGroup = function (groupPanels) {
|
|
13277
13360
|
return Object.keys(groupPanels).reduce(function (state, key) {
|
|
13278
13361
|
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
@@ -13289,6 +13372,17 @@ version: 4.12.0-beta.8
|
|
|
13289
13372
|
}, []);
|
|
13290
13373
|
};
|
|
13291
13374
|
__proto._getSideStateFromPanels = function (panels) {
|
|
13375
|
+
return panels.reduce(function (state, panel, i) {
|
|
13376
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13377
|
+
return __spread$1(state, [{
|
|
13378
|
+
key: i.toString(),
|
|
13379
|
+
start: start,
|
|
13380
|
+
end: start + panel.children.length - 1,
|
|
13381
|
+
element: panel
|
|
13382
|
+
}]);
|
|
13383
|
+
}, []);
|
|
13384
|
+
};
|
|
13385
|
+
__proto._getSideStateFromCrossStructure = function (panels) {
|
|
13292
13386
|
var groupPanels = this._getGroupFromAttribute(panels);
|
|
13293
13387
|
return this._getSideStateFromGroup(groupPanels);
|
|
13294
13388
|
};
|
|
@@ -13298,30 +13392,16 @@ version: 4.12.0-beta.8
|
|
|
13298
13392
|
return new Flicking(_this.camera.children[i], __assign$2(__assign$2({}, _this.sideOptions), {
|
|
13299
13393
|
horizontal: false,
|
|
13300
13394
|
panelsPerView: 1,
|
|
13301
|
-
defaultIndex: state.start
|
|
13302
|
-
moveType: "strict"
|
|
13395
|
+
defaultIndex: state.start
|
|
13303
13396
|
}));
|
|
13304
13397
|
});
|
|
13305
13398
|
};
|
|
13306
|
-
__proto._syncToCategory = function (index, outerIndex) {
|
|
13307
|
-
var _this = this;
|
|
13308
|
-
this.stopAnimation();
|
|
13309
|
-
this._sideFlicking.forEach(function (child, i) {
|
|
13310
|
-
var _a = _this._sideState[i],
|
|
13311
|
-
start = _a.start,
|
|
13312
|
-
end = _a.end;
|
|
13313
|
-
if (start <= index && end >= index && outerIndex !== i) {
|
|
13314
|
-
child.stopAnimation();
|
|
13315
|
-
void child.moveTo(index, 0);
|
|
13316
|
-
void _this.moveTo(i, 0);
|
|
13317
|
-
}
|
|
13318
|
-
});
|
|
13319
|
-
};
|
|
13320
13399
|
return CrossFlicking;
|
|
13321
13400
|
}(Flicking);
|
|
13322
13401
|
|
|
13323
13402
|
var CrossFlicking$1 = {
|
|
13324
13403
|
__proto__: null,
|
|
13404
|
+
SIDE_EVENTS: SIDE_EVENTS,
|
|
13325
13405
|
CrossFlicking: CrossFlicking
|
|
13326
13406
|
};
|
|
13327
13407
|
|