@egjs/flicking 4.12.0-beta.5 → 4.12.0-beta.7
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 +36 -0
- package/declaration/Flicking.d.ts +244 -244
- package/declaration/camera/Camera.d.ts +89 -90
- 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 -48
- 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 -13
- 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 -45
- package/dist/flicking.cjs.js +363 -27
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +355 -27
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +364 -27
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +1129 -785
- 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 +3 -2
- package/src/CrossFlicking.ts +403 -0
- package/src/camera/Camera.ts +4 -24
- package/src/const/external.ts +14 -0
- package/src/index.ts +4 -1
- package/src/index.umd.ts +2 -0
- package/src/utils.ts +21 -0
package/dist/flicking.pkgd.js
CHANGED
|
@@ -4,7 +4,7 @@ name: @egjs/flicking
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking
|
|
7
|
-
version: 4.12.0-beta.
|
|
7
|
+
version: 4.12.0-beta.7
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -12,7 +12,7 @@ version: 4.12.0-beta.5
|
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory());
|
|
13
13
|
})(this, (function () { 'use strict';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/******************************************************************************
|
|
16
16
|
Copyright (c) Microsoft Corporation.
|
|
17
17
|
|
|
18
18
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -26,7 +26,7 @@ version: 4.12.0-beta.5
|
|
|
26
26
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
27
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
28
|
***************************************************************************** */
|
|
29
|
-
/* global Reflect, Promise */
|
|
29
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
30
30
|
|
|
31
31
|
var extendStatics$3 = function (d, b) {
|
|
32
32
|
extendStatics$3 = Object.setPrototypeOf || {
|
|
@@ -111,7 +111,7 @@ version: 4.12.0-beta.5
|
|
|
111
111
|
}
|
|
112
112
|
function step(op) {
|
|
113
113
|
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
-
while (_) try {
|
|
114
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
115
115
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
116
116
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
117
117
|
switch (op[0]) {
|
|
@@ -215,6 +215,10 @@ version: 4.12.0-beta.5
|
|
|
215
215
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$1(arguments[i]));
|
|
216
216
|
return ar;
|
|
217
217
|
}
|
|
218
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
219
|
+
var e = new Error(message);
|
|
220
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
221
|
+
};
|
|
218
222
|
|
|
219
223
|
/*
|
|
220
224
|
Copyright (c) NAVER Corp.
|
|
@@ -790,6 +794,8 @@ version: 4.12.0-beta.5
|
|
|
790
794
|
STRICT: "strict"
|
|
791
795
|
};
|
|
792
796
|
var CLASS = {
|
|
797
|
+
VIEWPORT: "flicking-viewport",
|
|
798
|
+
CAMERA: "flicking-camera",
|
|
793
799
|
VERTICAL: "vertical",
|
|
794
800
|
HIDDEN: "flicking-hidden",
|
|
795
801
|
DEFAULT_VIRTUAL: "flicking-panel"
|
|
@@ -816,6 +822,17 @@ version: 4.12.0-beta.5
|
|
|
816
822
|
LTR: "ltr",
|
|
817
823
|
RTL: "rtl"
|
|
818
824
|
};
|
|
825
|
+
/**
|
|
826
|
+
* An object that contains the direction that {@link Flicking} is moving
|
|
827
|
+
* @ko {@link Flicking}이 움직이는 방향을 담고 있는 객체
|
|
828
|
+
* @type {object}
|
|
829
|
+
* @property {"horizontal"} HORIZONTAL horizontal<ko>수평 방향</ko>
|
|
830
|
+
* @property {"vertical"} VERTICAL vertical<ko>수직 방향</ko>
|
|
831
|
+
*/
|
|
832
|
+
var MOVE_DIRECTION = {
|
|
833
|
+
HORIZONTAL: "horizontal",
|
|
834
|
+
VERTICAL: "vertical"
|
|
835
|
+
};
|
|
819
836
|
|
|
820
837
|
var Constants = {
|
|
821
838
|
__proto__: null,
|
|
@@ -826,6 +843,7 @@ version: 4.12.0-beta.5
|
|
|
826
843
|
CLASS: CLASS,
|
|
827
844
|
CIRCULAR_FALLBACK: CIRCULAR_FALLBACK,
|
|
828
845
|
ORDER: ORDER,
|
|
846
|
+
MOVE_DIRECTION: MOVE_DIRECTION,
|
|
829
847
|
ERROR_CODE: CODE
|
|
830
848
|
};
|
|
831
849
|
|
|
@@ -1142,6 +1160,26 @@ version: 4.12.0-beta.5
|
|
|
1142
1160
|
obj.__proto__ = proto;
|
|
1143
1161
|
return obj;
|
|
1144
1162
|
};
|
|
1163
|
+
var camelize = function (str) {
|
|
1164
|
+
return str.replace(/[\s-_]([a-z])/g, function (all, letter) {
|
|
1165
|
+
return letter.toUpperCase();
|
|
1166
|
+
});
|
|
1167
|
+
};
|
|
1168
|
+
var getDataAttributes = function (element, attributePrefix) {
|
|
1169
|
+
var dataAttributes = {};
|
|
1170
|
+
var attributes = element.attributes;
|
|
1171
|
+
var length = attributes.length;
|
|
1172
|
+
for (var i = 0; i < length; ++i) {
|
|
1173
|
+
var attribute = attributes[i];
|
|
1174
|
+
var name_1 = attribute.name,
|
|
1175
|
+
value = attribute.value;
|
|
1176
|
+
if (name_1.indexOf(attributePrefix) === -1) {
|
|
1177
|
+
continue;
|
|
1178
|
+
}
|
|
1179
|
+
dataAttributes[camelize(name_1.replace(attributePrefix, ""))] = value;
|
|
1180
|
+
}
|
|
1181
|
+
return dataAttributes;
|
|
1182
|
+
};
|
|
1145
1183
|
|
|
1146
1184
|
var Utils = {
|
|
1147
1185
|
__proto__: null,
|
|
@@ -1173,7 +1211,9 @@ version: 4.12.0-beta.5
|
|
|
1173
1211
|
circulateIndex: circulateIndex,
|
|
1174
1212
|
range: range,
|
|
1175
1213
|
getElementSize: getElementSize,
|
|
1176
|
-
setPrototypeOf: setPrototypeOf
|
|
1214
|
+
setPrototypeOf: setPrototypeOf,
|
|
1215
|
+
camelize: camelize,
|
|
1216
|
+
getDataAttributes: getDataAttributes
|
|
1177
1217
|
};
|
|
1178
1218
|
|
|
1179
1219
|
/*
|
|
@@ -2655,7 +2695,7 @@ version: 4.12.0-beta.5
|
|
|
2655
2695
|
license: MIT
|
|
2656
2696
|
author: NAVER Corp.
|
|
2657
2697
|
repository: https://github.com/naver/egjs-axes
|
|
2658
|
-
version: 3.9.0
|
|
2698
|
+
version: 3.9.1-beta.0
|
|
2659
2699
|
*/
|
|
2660
2700
|
|
|
2661
2701
|
/*! *****************************************************************************
|
|
@@ -2709,9 +2749,9 @@ version: 4.12.0-beta.5
|
|
|
2709
2749
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2710
2750
|
}
|
|
2711
2751
|
|
|
2712
|
-
/*
|
|
2713
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
2714
|
-
* egjs projects are licensed under the MIT license
|
|
2752
|
+
/*
|
|
2753
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2754
|
+
* egjs projects are licensed under the MIT license
|
|
2715
2755
|
*/
|
|
2716
2756
|
/* eslint-disable no-new-func, no-nested-ternary */
|
|
2717
2757
|
var win;
|
|
@@ -2726,9 +2766,9 @@ version: 4.12.0-beta.5
|
|
|
2726
2766
|
win = window;
|
|
2727
2767
|
}
|
|
2728
2768
|
|
|
2729
|
-
/*
|
|
2730
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
2731
|
-
* egjs projects are licensed under the MIT license
|
|
2769
|
+
/*
|
|
2770
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2771
|
+
* egjs projects are licensed under the MIT license
|
|
2732
2772
|
*/
|
|
2733
2773
|
var DIRECTION_NONE = 1;
|
|
2734
2774
|
var DIRECTION_LEFT = 2;
|
|
@@ -2854,19 +2894,19 @@ version: 4.12.0-beta.5
|
|
|
2854
2894
|
};
|
|
2855
2895
|
caf = win.clearTimeout;
|
|
2856
2896
|
}
|
|
2857
|
-
/**
|
|
2858
|
-
* A polyfill for the window.requestAnimationFrame() method.
|
|
2859
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
2860
|
-
* @private
|
|
2897
|
+
/**
|
|
2898
|
+
* A polyfill for the window.requestAnimationFrame() method.
|
|
2899
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
2900
|
+
* @private
|
|
2861
2901
|
*/
|
|
2862
2902
|
var requestAnimationFrame = function (fp) {
|
|
2863
2903
|
return raf(fp);
|
|
2864
2904
|
};
|
|
2865
|
-
/**
|
|
2866
|
-
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2867
|
-
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2868
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2869
|
-
* @private
|
|
2905
|
+
/**
|
|
2906
|
+
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2907
|
+
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2908
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2909
|
+
* @private
|
|
2870
2910
|
*/
|
|
2871
2911
|
var cancelAnimationFrame = function (key) {
|
|
2872
2912
|
caf(key);
|
|
@@ -2993,6 +3033,9 @@ version: 4.12.0-beta.5
|
|
|
2993
3033
|
});
|
|
2994
3034
|
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
2995
3035
|
oldCssProps[prop] = element.style[prop];
|
|
3036
|
+
});
|
|
3037
|
+
// Old style props like user-select can be corrupted if you change the style directly in the logic above.
|
|
3038
|
+
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
2996
3039
|
element.style[prop] = newCssProps_1[prop];
|
|
2997
3040
|
});
|
|
2998
3041
|
}
|
|
@@ -3012,32 +3055,32 @@ version: 4.12.0-beta.5
|
|
|
3012
3055
|
this._axes = _axes;
|
|
3013
3056
|
this.holdingCount = 0;
|
|
3014
3057
|
}
|
|
3015
|
-
/**
|
|
3016
|
-
* This event is fired when a user holds an element on the screen of the device.
|
|
3017
|
-
* @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트
|
|
3018
|
-
* @event Axes#hold
|
|
3019
|
-
* @type {object}
|
|
3020
|
-
* @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
|
|
3021
|
-
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3022
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3023
|
-
* @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>
|
|
3024
|
-
*
|
|
3025
|
-
* @example
|
|
3026
|
-
* ```js
|
|
3027
|
-
* const axes = new eg.Axes({
|
|
3028
|
-
* "x": {
|
|
3029
|
-
* range: [0, 100]
|
|
3030
|
-
* },
|
|
3031
|
-
* "zoom": {
|
|
3032
|
-
* range: [50, 30]
|
|
3033
|
-
* }
|
|
3034
|
-
* }).on("hold", function(event) {
|
|
3035
|
-
* // event.pos
|
|
3036
|
-
* // event.input
|
|
3037
|
-
* // event.inputEvent
|
|
3038
|
-
* // isTrusted
|
|
3039
|
-
* });
|
|
3040
|
-
* ```
|
|
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
|
+
* ```
|
|
3041
3084
|
*/
|
|
3042
3085
|
var __proto = EventManager.prototype;
|
|
3043
3086
|
__proto.hold = function (pos, option) {
|
|
@@ -3049,78 +3092,78 @@ version: 4.12.0-beta.5
|
|
|
3049
3092
|
isTrusted: true
|
|
3050
3093
|
}));
|
|
3051
3094
|
};
|
|
3052
|
-
/**
|
|
3053
|
-
* Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true.
|
|
3054
|
-
* @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다
|
|
3055
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3056
|
-
* @example
|
|
3057
|
-
* ```js
|
|
3058
|
-
* const axes = new eg.Axes({
|
|
3059
|
-
* "x": {
|
|
3060
|
-
* range: [0, 100]
|
|
3061
|
-
* },
|
|
3062
|
-
* "zoom": {
|
|
3063
|
-
* range: [50, 30]
|
|
3064
|
-
* }
|
|
3065
|
-
* }).on("change", function(event) {
|
|
3066
|
-
* event.holding && event.set({x: 10});
|
|
3067
|
-
* });
|
|
3068
|
-
* ```
|
|
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
|
+
* ```
|
|
3069
3112
|
*/
|
|
3070
|
-
/** Specifies the animation coordinates to move after the 'release' or 'animationStart' events.
|
|
3071
|
-
* @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다.
|
|
3072
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
3073
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
3074
|
-
* @example
|
|
3075
|
-
* ```js
|
|
3076
|
-
* const axes = new eg.Axes({
|
|
3077
|
-
* "x": {
|
|
3078
|
-
* range: [0, 100]
|
|
3079
|
-
* },
|
|
3080
|
-
* "zoom": {
|
|
3081
|
-
* range: [50, 30]
|
|
3082
|
-
* }
|
|
3083
|
-
* }).on("animationStart", function(event) {
|
|
3084
|
-
* event.setTo({x: 10}, 2000);
|
|
3085
|
-
* });
|
|
3086
|
-
* ```
|
|
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
|
+
* ```
|
|
3087
3130
|
*/
|
|
3088
|
-
/**
|
|
3089
|
-
* This event is fired when a user release an element on the screen of the device.
|
|
3090
|
-
* @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트
|
|
3091
|
-
* @event Axes#release
|
|
3092
|
-
* @type {object}
|
|
3093
|
-
* @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
|
|
3094
|
-
* @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
|
|
3095
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3096
|
-
* @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>
|
|
3097
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3098
|
-
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
|
|
3099
|
-
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3100
|
-
* @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>
|
|
3101
|
-
*
|
|
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("release", function(event) {
|
|
3112
|
-
* // event.depaPos
|
|
3113
|
-
* // event.destPos
|
|
3114
|
-
* // event.delta
|
|
3115
|
-
* // event.input
|
|
3116
|
-
* // event.inputEvent
|
|
3117
|
-
* // event.setTo
|
|
3118
|
-
* // event.isTrusted
|
|
3119
|
-
*
|
|
3120
|
-
* // if you want to change the animation coordinates to move after the 'release' event.
|
|
3121
|
-
* event.setTo({x: 10}, 2000);
|
|
3122
|
-
* });
|
|
3123
|
-
* ```
|
|
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
|
+
* ```
|
|
3124
3167
|
*/
|
|
3125
3168
|
__proto.triggerRelease = function (param) {
|
|
3126
3169
|
var _a = this._getRoundPos(param.destPos, param.depaPos),
|
|
@@ -3133,43 +3176,43 @@ version: 4.12.0-beta.5
|
|
|
3133
3176
|
bounceRatio: this._getBounceRatio(roundPos)
|
|
3134
3177
|
})));
|
|
3135
3178
|
};
|
|
3136
|
-
/**
|
|
3137
|
-
* This event is fired when coordinate changes.
|
|
3138
|
-
* @ko 좌표가 변경됐을 때 발생하는 이벤트
|
|
3139
|
-
* @event Axes#change
|
|
3140
|
-
* @type {object}
|
|
3141
|
-
* @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
|
|
3142
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3143
|
-
* @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>
|
|
3144
|
-
* @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
|
|
3145
|
-
* @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>
|
|
3146
|
-
* @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
|
|
3147
|
-
* @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
|
|
3148
|
-
* @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>
|
|
3149
|
-
*
|
|
3150
|
-
* @example
|
|
3151
|
-
* ```js
|
|
3152
|
-
* const axes = new eg.Axes({
|
|
3153
|
-
* "x": {
|
|
3154
|
-
* range: [0, 100]
|
|
3155
|
-
* },
|
|
3156
|
-
* "zoom": {
|
|
3157
|
-
* range: [50, 30]
|
|
3158
|
-
* }
|
|
3159
|
-
* }).on("change", function(event) {
|
|
3160
|
-
* // event.pos
|
|
3161
|
-
* // event.delta
|
|
3162
|
-
* // event.input
|
|
3163
|
-
* // event.inputEvent
|
|
3164
|
-
* // event.holding
|
|
3165
|
-
* // event.set
|
|
3166
|
-
* // event.isTrusted
|
|
3167
|
-
*
|
|
3168
|
-
* // if you want to change the coordinates to move after the 'change' event.
|
|
3169
|
-
* // it works when the holding value of the change event is true.
|
|
3170
|
-
* event.holding && event.set({x: 10});
|
|
3171
|
-
* });
|
|
3172
|
-
* ```
|
|
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
|
+
* ```
|
|
3173
3216
|
*/
|
|
3174
3217
|
__proto.triggerChange = function (pos, depaPos, option, holding) {
|
|
3175
3218
|
var _this = this;
|
|
@@ -3206,42 +3249,42 @@ version: 4.12.0-beta.5
|
|
|
3206
3249
|
}
|
|
3207
3250
|
return !event.isCanceled();
|
|
3208
3251
|
};
|
|
3209
|
-
/**
|
|
3210
|
-
* This event is fired when animation starts.
|
|
3211
|
-
* @ko 에니메이션이 시작할 때 발생한다.
|
|
3212
|
-
* @event Axes#animationStart
|
|
3213
|
-
* @type {object}
|
|
3214
|
-
* @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
|
|
3215
|
-
* @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
|
|
3216
|
-
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
|
|
3217
|
-
* @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
|
|
3218
|
-
* @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>
|
|
3219
|
-
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
|
|
3220
|
-
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
|
|
3221
|
-
* @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>
|
|
3222
|
-
*
|
|
3223
|
-
* @example
|
|
3224
|
-
* ```js
|
|
3225
|
-
* const axes = new eg.Axes({
|
|
3226
|
-
* "x": {
|
|
3227
|
-
* range: [0, 100]
|
|
3228
|
-
* },
|
|
3229
|
-
* "zoom": {
|
|
3230
|
-
* range: [50, 30]
|
|
3231
|
-
* }
|
|
3232
|
-
* }).on("release", function(event) {
|
|
3233
|
-
* // event.depaPos
|
|
3234
|
-
* // event.destPos
|
|
3235
|
-
* // event.delta
|
|
3236
|
-
* // event.input
|
|
3237
|
-
* // event.inputEvent
|
|
3238
|
-
* // event.setTo
|
|
3239
|
-
* // event.isTrusted
|
|
3240
|
-
*
|
|
3241
|
-
* // if you want to change the animation coordinates to move after the 'animationStart' event.
|
|
3242
|
-
* event.setTo({x: 10}, 2000);
|
|
3243
|
-
* });
|
|
3244
|
-
* ```
|
|
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
|
+
* ```
|
|
3245
3288
|
*/
|
|
3246
3289
|
__proto.triggerAnimationStart = function (param) {
|
|
3247
3290
|
var _a = this._getRoundPos(param.destPos, param.depaPos),
|
|
@@ -3254,26 +3297,26 @@ version: 4.12.0-beta.5
|
|
|
3254
3297
|
this._axes.trigger(event);
|
|
3255
3298
|
return !event.isCanceled();
|
|
3256
3299
|
};
|
|
3257
|
-
/**
|
|
3258
|
-
* This event is fired when animation ends.
|
|
3259
|
-
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3260
|
-
* @event Axes#animationEnd
|
|
3261
|
-
* @type {object}
|
|
3262
|
-
* @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>
|
|
3263
|
-
*
|
|
3264
|
-
* @example
|
|
3265
|
-
* ```js
|
|
3266
|
-
* const axes = new eg.Axes({
|
|
3267
|
-
* "x": {
|
|
3268
|
-
* range: [0, 100]
|
|
3269
|
-
* },
|
|
3270
|
-
* "zoom": {
|
|
3271
|
-
* range: [50, 30]
|
|
3272
|
-
* }
|
|
3273
|
-
* }).on("animationEnd", function(event) {
|
|
3274
|
-
* // event.isTrusted
|
|
3275
|
-
* });
|
|
3276
|
-
* ```
|
|
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
|
+
* ```
|
|
3277
3320
|
*/
|
|
3278
3321
|
__proto.triggerAnimationEnd = function (isTrusted) {
|
|
3279
3322
|
if (isTrusted === void 0) {
|
|
@@ -3283,26 +3326,26 @@ version: 4.12.0-beta.5
|
|
|
3283
3326
|
isTrusted: isTrusted
|
|
3284
3327
|
}));
|
|
3285
3328
|
};
|
|
3286
|
-
/**
|
|
3287
|
-
* This event is fired when all actions have been completed.
|
|
3288
|
-
* @ko 에니메이션이 끝났을 때 발생한다.
|
|
3289
|
-
* @event Axes#finish
|
|
3290
|
-
* @type {object}
|
|
3291
|
-
* @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>
|
|
3292
|
-
*
|
|
3293
|
-
* @example
|
|
3294
|
-
* ```js
|
|
3295
|
-
* const axes = new eg.Axes({
|
|
3296
|
-
* "x": {
|
|
3297
|
-
* range: [0, 100]
|
|
3298
|
-
* },
|
|
3299
|
-
* "zoom": {
|
|
3300
|
-
* range: [50, 30]
|
|
3301
|
-
* }
|
|
3302
|
-
* }).on("finish", function(event) {
|
|
3303
|
-
* // event.isTrusted
|
|
3304
|
-
* });
|
|
3305
|
-
* ```
|
|
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
|
+
* ```
|
|
3306
3349
|
*/
|
|
3307
3350
|
__proto.triggerFinish = function (isTrusted) {
|
|
3308
3351
|
if (isTrusted === void 0) {
|
|
@@ -3384,9 +3427,9 @@ version: 4.12.0-beta.5
|
|
|
3384
3427
|
return InterruptManager;
|
|
3385
3428
|
}();
|
|
3386
3429
|
|
|
3387
|
-
/*
|
|
3388
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
3389
|
-
* egjs projects are licensed under the MIT license
|
|
3430
|
+
/*
|
|
3431
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
3432
|
+
* egjs projects are licensed under the MIT license
|
|
3390
3433
|
*/
|
|
3391
3434
|
var getInsidePosition = function (destPos, range, circular, bounce) {
|
|
3392
3435
|
var toDestPos = destPos;
|
|
@@ -3515,9 +3558,9 @@ version: 4.12.0-beta.5
|
|
|
3515
3558
|
});
|
|
3516
3559
|
this._complementOptions();
|
|
3517
3560
|
};
|
|
3518
|
-
/**
|
|
3519
|
-
* set up 'css' expression
|
|
3520
|
-
* @private
|
|
3561
|
+
/**
|
|
3562
|
+
* set up 'css' expression
|
|
3563
|
+
* @private
|
|
3521
3564
|
*/
|
|
3522
3565
|
__proto._complementOptions = function () {
|
|
3523
3566
|
var _this = this;
|
|
@@ -4413,15 +4456,15 @@ version: 4.12.0-beta.5
|
|
|
4413
4456
|
complete();
|
|
4414
4457
|
}
|
|
4415
4458
|
};
|
|
4416
|
-
/**
|
|
4417
|
-
* Get estimated final value.
|
|
4418
|
-
*
|
|
4419
|
-
* If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
|
|
4420
|
-
* - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
|
|
4421
|
-
* 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.
|
|
4422
|
-
* - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
|
|
4423
|
-
* @param originalIntendedPos
|
|
4424
|
-
* @param destPos
|
|
4459
|
+
/**
|
|
4460
|
+
* Get estimated final value.
|
|
4461
|
+
*
|
|
4462
|
+
* If destPos is within the 'error range' of the original intended position, the initial intended position is returned.
|
|
4463
|
+
* - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100;
|
|
4464
|
+
* If dest Pos is outside the 'range of error' compared to the originally intended pos, it is returned rounded based on the originally intended pos.
|
|
4465
|
+
* - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123
|
|
4466
|
+
* @param originalIntendedPos
|
|
4467
|
+
* @param destPos
|
|
4425
4468
|
*/
|
|
4426
4469
|
__proto._getFinalPos = function (destPos, originalIntendedPos) {
|
|
4427
4470
|
var _this = this;
|
|
@@ -4547,111 +4590,111 @@ version: 4.12.0-beta.5
|
|
|
4547
4590
|
return EasingManager;
|
|
4548
4591
|
}(AnimationManager);
|
|
4549
4592
|
|
|
4550
|
-
/**
|
|
4551
|
-
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4552
|
-
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4553
|
-
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4554
|
-
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4555
|
-
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4556
|
-
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4557
|
-
* @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>
|
|
4558
|
-
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4559
|
-
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
4560
|
-
* @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>
|
|
4561
|
-
* @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
|
|
4562
|
-
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
|
|
4593
|
+
/**
|
|
4594
|
+
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4595
|
+
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4596
|
+
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4597
|
+
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4598
|
+
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4599
|
+
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4600
|
+
* @param {Number[]} [bounce] The size of bouncing area. The coordinates can exceed the coordinate area as much as the bouncing area based on user action. If the coordinates does not exceed the bouncing area when an element is dragged, the coordinates where bouncing effects are applied are retuned back into the coordinate area<ko>바운스 영역의 크기. 사용자의 동작에 따라 좌표가 좌표 영역을 넘어 바운스 영역의 크기만큼 더 이동할 수 있다. 사용자가 끌어다 놓는 동작을 했을 때 좌표가 바운스 영역에 있으면, 바운스 효과가 적용된 좌표가 다시 좌표 영역 안으로 들어온다</ko>
|
|
4601
|
+
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4602
|
+
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
4603
|
+
* @param {Boolean[]} [circular] Indicates whether a circular element is available. If it is set to "true" and an element is dragged outside the coordinate area, the element will appear on the other side.<ko>순환 여부. 'true'로 설정한 방향의 좌표 영역 밖으로 엘리먼트가 이동하면 반대 방향에서 엘리먼트가 나타난다</ko>
|
|
4604
|
+
* @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum <ko>최소 좌표 방향의 순환 여부</ko>
|
|
4605
|
+
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko>
|
|
4563
4606
|
**/
|
|
4564
|
-
/**
|
|
4565
|
-
* @typedef {Object} AxesOption The option object of the eg.Axes module
|
|
4566
|
-
* @ko eg.Axes 모듈의 옵션 객체
|
|
4567
|
-
* @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
|
|
4568
|
-
* @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
|
|
4569
|
-
* @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
|
|
4570
|
-
* @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>
|
|
4571
|
-
* @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
|
|
4572
|
-
* - true: It can be paused or stopped by user action or the API.
|
|
4573
|
-
* - false: It cannot be paused or stopped by user action or the API while it is running.
|
|
4574
|
-
* <ko>진행 중인 애니메이션 중지 가능 여부.
|
|
4575
|
-
* - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
|
|
4576
|
-
* - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
|
|
4577
|
-
* @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)
|
|
4578
|
-
* [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
|
|
4579
|
-
* [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
|
|
4580
|
-
* @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
|
|
4607
|
+
/**
|
|
4608
|
+
* @typedef {Object} AxesOption The option object of the eg.Axes module
|
|
4609
|
+
* @ko eg.Axes 모듈의 옵션 객체
|
|
4610
|
+
* @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation <ko>애니메이션에 적용할 easing 함수</ko>
|
|
4611
|
+
* @param {Number} [maximumDuration=Infinity] Maximum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간</ko>
|
|
4612
|
+
* @param {Number} [minimumDuration=0] Minimum duration of the animation <ko>가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간</ko>
|
|
4613
|
+
* @param {Number} [deceleration=0.0006] Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time. <ko>사용자의 동작으로 가속도가 적용된 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아진다</ko>
|
|
4614
|
+
* @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible.
|
|
4615
|
+
* - true: It can be paused or stopped by user action or the API.
|
|
4616
|
+
* - false: It cannot be paused or stopped by user action or the API while it is running.
|
|
4617
|
+
* <ko>진행 중인 애니메이션 중지 가능 여부.
|
|
4618
|
+
* - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다.
|
|
4619
|
+
* - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다</ko>
|
|
4620
|
+
* @param {Number} [round=null] Rounding unit. For example, 0.1 rounds to 0.1 decimal point(6.1234 => 6.1), 5 rounds to 5 (93 => 95)
|
|
4621
|
+
* [Details](https://github.com/naver/egjs-axes/wiki/round-option)<ko>반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95).
|
|
4622
|
+
* [상세내용](https://github.com/naver/egjs-axes/wiki/round-option)</ko>
|
|
4623
|
+
* @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area <ko>좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부</ko>
|
|
4581
4624
|
**/
|
|
4582
|
-
/**
|
|
4583
|
-
* 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.
|
|
4584
|
-
* @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다.
|
|
4585
|
-
* @extends eg.Component
|
|
4586
|
-
*
|
|
4587
|
-
* @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>
|
|
4588
|
-
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4589
|
-
* @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>
|
|
4590
|
-
*
|
|
4591
|
-
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4592
|
-
* @example
|
|
4593
|
-
* ```js
|
|
4594
|
-
* // 1. Initialize eg.Axes
|
|
4595
|
-
* const axes = new eg.Axes({
|
|
4596
|
-
* something1: {
|
|
4597
|
-
* range: [0, 150],
|
|
4598
|
-
* bounce: 50
|
|
4599
|
-
* },
|
|
4600
|
-
* something2: {
|
|
4601
|
-
* range: [0, 200],
|
|
4602
|
-
* bounce: 100
|
|
4603
|
-
* },
|
|
4604
|
-
* somethingN: {
|
|
4605
|
-
* range: [1, 10],
|
|
4606
|
-
* }
|
|
4607
|
-
* }, {
|
|
4608
|
-
* deceleration : 0.0024
|
|
4609
|
-
* });
|
|
4610
|
-
*
|
|
4611
|
-
* // 2. attach event handler
|
|
4612
|
-
* axes.on({
|
|
4613
|
-
* "hold" : function(evt) {
|
|
4614
|
-
* },
|
|
4615
|
-
* "release" : function(evt) {
|
|
4616
|
-
* },
|
|
4617
|
-
* "animationStart" : function(evt) {
|
|
4618
|
-
* },
|
|
4619
|
-
* "animationEnd" : function(evt) {
|
|
4620
|
-
* },
|
|
4621
|
-
* "change" : function(evt) {
|
|
4622
|
-
* }
|
|
4623
|
-
* });
|
|
4624
|
-
*
|
|
4625
|
-
* // 3. Initialize inputTypes
|
|
4626
|
-
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4627
|
-
* scale: [0.5, 1]
|
|
4628
|
-
* });
|
|
4629
|
-
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4630
|
-
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4631
|
-
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4632
|
-
* scale: 1.5
|
|
4633
|
-
* });
|
|
4634
|
-
*
|
|
4635
|
-
* // 4. Connect eg.Axes and InputTypes
|
|
4636
|
-
* // [PanInput] When the mouse or touchscreen is down and moved.
|
|
4637
|
-
* // Connect the 'something2' axis to the mouse or touchscreen x position and
|
|
4638
|
-
* // connect the 'somethingN' axis to the mouse or touchscreen y position.
|
|
4639
|
-
* axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea);
|
|
4640
|
-
*
|
|
4641
|
-
* // Connect only one 'something1' axis to the mouse or touchscreen x position.
|
|
4642
|
-
* axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove);
|
|
4643
|
-
*
|
|
4644
|
-
* // Connect only one 'something2' axis to the mouse or touchscreen y position.
|
|
4645
|
-
* axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove);
|
|
4646
|
-
*
|
|
4647
|
-
* // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
|
|
4648
|
-
* axes.connect("something2", pinchInputArea);
|
|
4649
|
-
* ```
|
|
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
|
+
* ```
|
|
4650
4693
|
*/
|
|
4651
4694
|
var Axes = /*#__PURE__*/function (_super) {
|
|
4652
4695
|
__extends$1(Axes, _super);
|
|
4653
|
-
/**
|
|
4654
|
-
*
|
|
4696
|
+
/**
|
|
4697
|
+
*
|
|
4655
4698
|
*/
|
|
4656
4699
|
function Axes(axis, options, startPos) {
|
|
4657
4700
|
if (axis === void 0) {
|
|
@@ -4691,23 +4734,23 @@ version: 4.12.0-beta.5
|
|
|
4691
4734
|
}
|
|
4692
4735
|
var __proto = Axes.prototype;
|
|
4693
4736
|
Object.defineProperty(__proto, "holding", {
|
|
4694
|
-
/**
|
|
4695
|
-
* @name Axes#holding
|
|
4696
|
-
* @desc Returns true if at least one input is in progress.
|
|
4697
|
-
* @ko 입력이 하나 이상 진행 중인지 여부를 반환한다.
|
|
4698
|
-
*
|
|
4699
|
-
* @readonly
|
|
4700
|
-
* @type {boolean}
|
|
4701
|
-
* @example
|
|
4702
|
-
* ```js
|
|
4703
|
-
* const axes = new eg.Axes({
|
|
4704
|
-
* x: {
|
|
4705
|
-
* range: [0, 100],
|
|
4706
|
-
* },
|
|
4707
|
-
* });
|
|
4708
|
-
*
|
|
4709
|
-
* axes.holding
|
|
4710
|
-
* ```
|
|
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
|
+
* ```
|
|
4711
4754
|
*/
|
|
4712
4755
|
get: function () {
|
|
4713
4756
|
return this.eventManager.holdingCount > 0;
|
|
@@ -4715,30 +4758,30 @@ version: 4.12.0-beta.5
|
|
|
4715
4758
|
enumerable: false,
|
|
4716
4759
|
configurable: true
|
|
4717
4760
|
});
|
|
4718
|
-
/**
|
|
4719
|
-
* Connect the axis of eg.Axes to the inputType.
|
|
4720
|
-
* @ko eg.Axes의 축과 inputType을 연결한다
|
|
4721
|
-
* @param {(String[]|String)} axes The name of the axis to associate with inputType <ko>inputType과 연결할 축의 이름</ko>
|
|
4722
|
-
* @param {Object} inputType The inputType instance to associate with the axis of eg.Axes <ko>eg.Axes의 축과 연결할 inputType 인스턴스</ko>
|
|
4723
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4724
|
-
* @example
|
|
4725
|
-
* ```js
|
|
4726
|
-
* const axes = new eg.Axes({
|
|
4727
|
-
* "x": {
|
|
4728
|
-
* range: [0, 100]
|
|
4729
|
-
* },
|
|
4730
|
-
* "xOther": {
|
|
4731
|
-
* range: [-100, 100]
|
|
4732
|
-
* }
|
|
4733
|
-
* });
|
|
4734
|
-
*
|
|
4735
|
-
* axes.connect("x", new eg.Axes.PanInput("#area1"))
|
|
4736
|
-
* .connect("x xOther", new eg.Axes.PanInput("#area2"))
|
|
4737
|
-
* .connect(" xOther", new eg.Axes.PanInput("#area3"))
|
|
4738
|
-
* .connect(["x"], new eg.Axes.PanInput("#area4"))
|
|
4739
|
-
* .connect(["xOther", "x"], new eg.Axes.PanInput("#area5"))
|
|
4740
|
-
* .connect(["", "xOther"], new eg.Axes.PanInput("#area6"));
|
|
4741
|
-
* ```
|
|
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
|
+
* ```
|
|
4742
4785
|
*/
|
|
4743
4786
|
__proto.connect = function (axes, inputType) {
|
|
4744
4787
|
var mapped;
|
|
@@ -4756,33 +4799,33 @@ version: 4.12.0-beta.5
|
|
|
4756
4799
|
this._inputs.push(inputType);
|
|
4757
4800
|
return this;
|
|
4758
4801
|
};
|
|
4759
|
-
/**
|
|
4760
|
-
* Disconnect the axis of eg.Axes from the inputType.
|
|
4761
|
-
* @ko eg.Axes의 축과 inputType의 연결을 끊는다.
|
|
4762
|
-
* @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes <ko>eg.Axes의 축과 연결한 inputType 인스턴스</ko>
|
|
4763
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4764
|
-
* @example
|
|
4765
|
-
* ```js
|
|
4766
|
-
* const axes = new eg.Axes({
|
|
4767
|
-
* "x": {
|
|
4768
|
-
* range: [0, 100]
|
|
4769
|
-
* },
|
|
4770
|
-
* "xOther": {
|
|
4771
|
-
* range: [-100, 100]
|
|
4772
|
-
* }
|
|
4773
|
-
* });
|
|
4774
|
-
*
|
|
4775
|
-
* const input1 = new eg.Axes.PanInput("#area1");
|
|
4776
|
-
* const input2 = new eg.Axes.PanInput("#area2");
|
|
4777
|
-
* const input3 = new eg.Axes.PanInput("#area3");
|
|
4778
|
-
*
|
|
4779
|
-
* axes.connect("x", input1);
|
|
4780
|
-
* .connect("x xOther", input2)
|
|
4781
|
-
* .connect(["xOther", "x"], input3);
|
|
4782
|
-
*
|
|
4783
|
-
* axes.disconnect(input1); // disconnects input1
|
|
4784
|
-
* axes.disconnect(); // disconnects all of them
|
|
4785
|
-
* ```
|
|
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
|
+
* ```
|
|
4786
4829
|
*/
|
|
4787
4830
|
__proto.disconnect = function (inputType) {
|
|
4788
4831
|
if (inputType) {
|
|
@@ -4799,60 +4842,60 @@ version: 4.12.0-beta.5
|
|
|
4799
4842
|
}
|
|
4800
4843
|
return this;
|
|
4801
4844
|
};
|
|
4802
|
-
/**
|
|
4803
|
-
* Returns the current position of the coordinates.
|
|
4804
|
-
* @ko 좌표의 현재 위치를 반환한다
|
|
4805
|
-
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
4806
|
-
* @return {Object.<string, number>} Axis coordinate information <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
|
-
* "zoom": {
|
|
4817
|
-
* range: [50, 30]
|
|
4818
|
-
* }
|
|
4819
|
-
* });
|
|
4820
|
-
*
|
|
4821
|
-
* axes.get(); // {"x": 0, "xOther": -100, "zoom": 50}
|
|
4822
|
-
* axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50}
|
|
4823
|
-
* ```
|
|
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
|
+
* ```
|
|
4824
4867
|
*/
|
|
4825
4868
|
__proto.get = function (axes) {
|
|
4826
4869
|
return this.axisManager.get(axes);
|
|
4827
4870
|
};
|
|
4828
|
-
/**
|
|
4829
|
-
* Moves an axis to specific coordinates.
|
|
4830
|
-
* @ko 좌표를 이동한다.
|
|
4831
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4832
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4833
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4834
|
-
* @example
|
|
4835
|
-
* ```js
|
|
4836
|
-
* const axes = new eg.Axes({
|
|
4837
|
-
* "x": {
|
|
4838
|
-
* range: [0, 100]
|
|
4839
|
-
* },
|
|
4840
|
-
* "xOther": {
|
|
4841
|
-
* range: [-100, 100]
|
|
4842
|
-
* },
|
|
4843
|
-
* "zoom": {
|
|
4844
|
-
* range: [50, 30]
|
|
4845
|
-
* }
|
|
4846
|
-
* });
|
|
4847
|
-
*
|
|
4848
|
-
* axes.setTo({"x": 30, "zoom": 60});
|
|
4849
|
-
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4850
|
-
*
|
|
4851
|
-
* axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation
|
|
4852
|
-
*
|
|
4853
|
-
* // after 1000 ms
|
|
4854
|
-
* axes.get(); // {"x": 100, "xOther": 60, "zoom": 60}
|
|
4855
|
-
* ```
|
|
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
|
+
* ```
|
|
4856
4899
|
*/
|
|
4857
4900
|
__proto.setTo = function (pos, duration) {
|
|
4858
4901
|
if (duration === void 0) {
|
|
@@ -4861,34 +4904,34 @@ version: 4.12.0-beta.5
|
|
|
4861
4904
|
this.animationManager.setTo(pos, duration);
|
|
4862
4905
|
return this;
|
|
4863
4906
|
};
|
|
4864
|
-
/**
|
|
4865
|
-
* Moves an axis from the current coordinates to specific coordinates.
|
|
4866
|
-
* @ko 현재 좌표를 기준으로 좌표를 이동한다.
|
|
4867
|
-
* @param {Object.<string, number>} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4868
|
-
* @param {Number} [duration=0] Duration of the animation (unit: ms) <ko>애니메이션 진행 시간(단위: ms)</ko>
|
|
4869
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4870
|
-
* @example
|
|
4871
|
-
* ```js
|
|
4872
|
-
* const axes = new eg.Axes({
|
|
4873
|
-
* "x": {
|
|
4874
|
-
* range: [0, 100]
|
|
4875
|
-
* },
|
|
4876
|
-
* "xOther": {
|
|
4877
|
-
* range: [-100, 100]
|
|
4878
|
-
* },
|
|
4879
|
-
* "zoom": {
|
|
4880
|
-
* range: [50, 30]
|
|
4881
|
-
* }
|
|
4882
|
-
* });
|
|
4883
|
-
*
|
|
4884
|
-
* axes.setBy({"x": 30, "zoom": 10});
|
|
4885
|
-
* axes.get(); // {"x": 30, "xOther": -100, "zoom": 60}
|
|
4886
|
-
*
|
|
4887
|
-
* axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation
|
|
4888
|
-
*
|
|
4889
|
-
* // after 1000 ms
|
|
4890
|
-
* axes.get(); // {"x": 100, "xOther": -40, "zoom": 60}
|
|
4891
|
-
* ```
|
|
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
|
+
* ```
|
|
4892
4935
|
*/
|
|
4893
4936
|
__proto.setBy = function (pos, duration) {
|
|
4894
4937
|
if (duration === void 0) {
|
|
@@ -4897,230 +4940,230 @@ version: 4.12.0-beta.5
|
|
|
4897
4940
|
this.animationManager.setBy(pos, duration);
|
|
4898
4941
|
return this;
|
|
4899
4942
|
};
|
|
4900
|
-
/**
|
|
4901
|
-
* Change the options of Axes instance.
|
|
4902
|
-
* @ko 인스턴스의 옵션을 변경한다.
|
|
4903
|
-
* @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
|
|
4904
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4905
|
-
* @example
|
|
4906
|
-
* ```js
|
|
4907
|
-
* const axes = new eg.Axes({
|
|
4908
|
-
* "x": {
|
|
4909
|
-
* range: [0, 100]
|
|
4910
|
-
* },
|
|
4911
|
-
* }, {
|
|
4912
|
-
* round: 10,
|
|
4913
|
-
* });
|
|
4914
|
-
*
|
|
4915
|
-
* axes.setTo({"x": 48});
|
|
4916
|
-
* axes.get(); // {"x": 50}
|
|
4917
|
-
*
|
|
4918
|
-
* axes.setOptions({
|
|
4919
|
-
* round: 1,
|
|
4920
|
-
* });
|
|
4921
|
-
*
|
|
4922
|
-
* axes.setTo({"x": 48});
|
|
4923
|
-
* axes.get(); // {"x": 48}
|
|
4924
|
-
* ```
|
|
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
|
+
* ```
|
|
4925
4968
|
*/
|
|
4926
4969
|
__proto.setOptions = function (options) {
|
|
4927
4970
|
this.options = __assign$1(__assign$1({}, this.options), options);
|
|
4928
4971
|
this.animationManager.setOptions(options);
|
|
4929
4972
|
return this;
|
|
4930
4973
|
};
|
|
4931
|
-
/**
|
|
4932
|
-
* Change the information of an existing axis.
|
|
4933
|
-
* @ko 존재하는 축의 정보를 변경한다.
|
|
4934
|
-
* @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
|
|
4935
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4936
|
-
* @example
|
|
4937
|
-
* ```js
|
|
4938
|
-
* const axes = new eg.Axes({
|
|
4939
|
-
* "x": {
|
|
4940
|
-
* range: [0, 100]
|
|
4941
|
-
* },
|
|
4942
|
-
* });
|
|
4943
|
-
*
|
|
4944
|
-
* axes.setTo({"x": 150});
|
|
4945
|
-
* axes.get(); // {"x": 100}
|
|
4946
|
-
*
|
|
4947
|
-
* axes.setAxis({
|
|
4948
|
-
* "x": {
|
|
4949
|
-
* range: [0, 200]
|
|
4950
|
-
* },
|
|
4951
|
-
* });
|
|
4952
|
-
*
|
|
4953
|
-
* axes.setTo({"x": 150});
|
|
4954
|
-
* axes.get(); // {"x": 150}
|
|
4955
|
-
* ```
|
|
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
|
+
* ```
|
|
4956
4999
|
*/
|
|
4957
5000
|
__proto.setAxis = function (axis) {
|
|
4958
5001
|
this.axisManager.setAxis(axis);
|
|
4959
5002
|
return this;
|
|
4960
5003
|
};
|
|
4961
|
-
/**
|
|
4962
|
-
* Stop an animation in progress.
|
|
4963
|
-
* @ko 재생 중인 애니메이션을 정지한다.
|
|
4964
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4965
|
-
* @example
|
|
4966
|
-
* ```js
|
|
4967
|
-
* const axes = new eg.Axes({
|
|
4968
|
-
* "x": {
|
|
4969
|
-
* range: [0, 100]
|
|
4970
|
-
* },
|
|
4971
|
-
* });
|
|
4972
|
-
*
|
|
4973
|
-
* axes.setTo({"x": 10}, 1000); // start animatation
|
|
4974
|
-
*
|
|
4975
|
-
* // after 500 ms
|
|
4976
|
-
* axes.stopAnimation(); // stop animation during movement.
|
|
4977
|
-
* ```
|
|
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
|
+
* ```
|
|
4978
5021
|
*/
|
|
4979
5022
|
__proto.stopAnimation = function () {
|
|
4980
5023
|
this.animationManager.stopAnimation();
|
|
4981
5024
|
this.animationManager.finish(false);
|
|
4982
5025
|
return this;
|
|
4983
5026
|
};
|
|
4984
|
-
/**
|
|
4985
|
-
* Change the destination of an animation in progress.
|
|
4986
|
-
* @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다.
|
|
4987
|
-
* @param {UpdateAnimationOption} pos The coordinate to move to <ko>이동할 좌표</ko>
|
|
4988
|
-
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
4989
|
-
* @example
|
|
4990
|
-
* ```js
|
|
4991
|
-
* const axes = new eg.Axes({
|
|
4992
|
-
* "x": {
|
|
4993
|
-
* range: [0, 200]
|
|
4994
|
-
* },
|
|
4995
|
-
* "y": {
|
|
4996
|
-
* range: [0, 200]
|
|
4997
|
-
* }
|
|
4998
|
-
* });
|
|
4999
|
-
*
|
|
5000
|
-
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5001
|
-
*
|
|
5002
|
-
* // after 500 ms
|
|
5003
|
-
* axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100}
|
|
5004
|
-
*
|
|
5005
|
-
* // after 500 ms
|
|
5006
|
-
* axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo
|
|
5007
|
-
*
|
|
5008
|
-
* // after 700 ms
|
|
5009
|
-
* 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.
|
|
5010
|
-
* ```
|
|
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
|
+
* ```
|
|
5011
5054
|
*/
|
|
5012
5055
|
__proto.updateAnimation = function (options) {
|
|
5013
5056
|
this.animationManager.updateAnimation(options);
|
|
5014
5057
|
return this;
|
|
5015
5058
|
};
|
|
5016
|
-
/**
|
|
5017
|
-
* Returns whether there is a coordinate in the bounce area of the target axis.
|
|
5018
|
-
* @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다
|
|
5019
|
-
* @param {Object} [axes] The names of the axis <ko>축 이름들</ko>
|
|
5020
|
-
* @return {Boolen} Whether the bounce area exists. <ko>bounce 영역 존재 여부</ko>
|
|
5021
|
-
* @example
|
|
5022
|
-
* ```js
|
|
5023
|
-
* const axes = new eg.Axes({
|
|
5024
|
-
* "x": {
|
|
5025
|
-
* range: [0, 100]
|
|
5026
|
-
* },
|
|
5027
|
-
* "xOther": {
|
|
5028
|
-
* range: [-100, 100]
|
|
5029
|
-
* },
|
|
5030
|
-
* "zoom": {
|
|
5031
|
-
* range: [50, 30]
|
|
5032
|
-
* }
|
|
5033
|
-
* });
|
|
5034
|
-
*
|
|
5035
|
-
* axes.isBounceArea(["x"]);
|
|
5036
|
-
* axes.isBounceArea(["x", "zoom"]);
|
|
5037
|
-
* axes.isBounceArea();
|
|
5038
|
-
* ```
|
|
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
|
+
* ```
|
|
5039
5082
|
*/
|
|
5040
5083
|
__proto.isBounceArea = function (axes) {
|
|
5041
5084
|
return this.axisManager.isOutside(axes);
|
|
5042
5085
|
};
|
|
5043
|
-
/**
|
|
5044
|
-
* Destroys properties, and events used in a module and disconnect all connections to inputTypes.
|
|
5045
|
-
* @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
|
|
5086
|
+
/**
|
|
5087
|
+
* Destroys properties, and events used in a module and disconnect all connections to inputTypes.
|
|
5088
|
+
* @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다.
|
|
5046
5089
|
*/
|
|
5047
5090
|
__proto.destroy = function () {
|
|
5048
5091
|
this.disconnect();
|
|
5049
5092
|
this.eventManager.destroy();
|
|
5050
5093
|
};
|
|
5051
|
-
/**
|
|
5052
|
-
* @name VERSION
|
|
5053
|
-
* @desc Version info string
|
|
5054
|
-
* @ko 버전정보 문자열
|
|
5055
|
-
*
|
|
5056
|
-
* @constant
|
|
5057
|
-
* @type {String}
|
|
5058
|
-
* @example
|
|
5059
|
-
* ```js
|
|
5060
|
-
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5061
|
-
* ```
|
|
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
|
+
* ```
|
|
5062
5105
|
*/
|
|
5063
|
-
Axes.VERSION = "3.9.0";
|
|
5106
|
+
Axes.VERSION = "3.9.1-beta.0";
|
|
5064
5107
|
/* eslint-enable */
|
|
5065
|
-
/**
|
|
5066
|
-
* @name TRANSFORM
|
|
5067
|
-
* @desc Returns the transform attribute with CSS vendor prefixes.
|
|
5068
|
-
* @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다.
|
|
5069
|
-
*
|
|
5070
|
-
* @constant
|
|
5071
|
-
* @type {String}
|
|
5072
|
-
* @example
|
|
5073
|
-
* ```js
|
|
5074
|
-
* eg.Axes.TRANSFORM; // "transform" or "webkitTransform"
|
|
5075
|
-
* ```
|
|
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
|
+
* ```
|
|
5076
5119
|
*/
|
|
5077
5120
|
Axes.TRANSFORM = TRANSFORM;
|
|
5078
|
-
/**
|
|
5079
|
-
* @name DIRECTION_NONE
|
|
5080
|
-
* @constant
|
|
5081
|
-
* @type {Number}
|
|
5121
|
+
/**
|
|
5122
|
+
* @name DIRECTION_NONE
|
|
5123
|
+
* @constant
|
|
5124
|
+
* @type {Number}
|
|
5082
5125
|
*/
|
|
5083
5126
|
Axes.DIRECTION_NONE = DIRECTION_NONE;
|
|
5084
|
-
/**
|
|
5085
|
-
* @name DIRECTION_LEFT
|
|
5086
|
-
* @constant
|
|
5087
|
-
* @type {Number}
|
|
5127
|
+
/**
|
|
5128
|
+
* @name DIRECTION_LEFT
|
|
5129
|
+
* @constant
|
|
5130
|
+
* @type {Number}
|
|
5088
5131
|
*/
|
|
5089
5132
|
Axes.DIRECTION_LEFT = DIRECTION_LEFT;
|
|
5090
|
-
/**
|
|
5091
|
-
* @name DIRECTION_RIGHT
|
|
5092
|
-
* @constant
|
|
5093
|
-
* @type {Number}
|
|
5133
|
+
/**
|
|
5134
|
+
* @name DIRECTION_RIGHT
|
|
5135
|
+
* @constant
|
|
5136
|
+
* @type {Number}
|
|
5094
5137
|
*/
|
|
5095
5138
|
Axes.DIRECTION_RIGHT = DIRECTION_RIGHT;
|
|
5096
|
-
/**
|
|
5097
|
-
* @name DIRECTION_UP
|
|
5098
|
-
* @constant
|
|
5099
|
-
* @type {Number}
|
|
5139
|
+
/**
|
|
5140
|
+
* @name DIRECTION_UP
|
|
5141
|
+
* @constant
|
|
5142
|
+
* @type {Number}
|
|
5100
5143
|
*/
|
|
5101
5144
|
Axes.DIRECTION_UP = DIRECTION_UP;
|
|
5102
|
-
/**
|
|
5103
|
-
* @name DIRECTION_DOWN
|
|
5104
|
-
* @constant
|
|
5105
|
-
* @type {Number}
|
|
5145
|
+
/**
|
|
5146
|
+
* @name DIRECTION_DOWN
|
|
5147
|
+
* @constant
|
|
5148
|
+
* @type {Number}
|
|
5106
5149
|
*/
|
|
5107
5150
|
Axes.DIRECTION_DOWN = DIRECTION_DOWN;
|
|
5108
|
-
/**
|
|
5109
|
-
* @name DIRECTION_HORIZONTAL
|
|
5110
|
-
* @constant
|
|
5111
|
-
* @type {Number}
|
|
5151
|
+
/**
|
|
5152
|
+
* @name DIRECTION_HORIZONTAL
|
|
5153
|
+
* @constant
|
|
5154
|
+
* @type {Number}
|
|
5112
5155
|
*/
|
|
5113
5156
|
Axes.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL;
|
|
5114
|
-
/**
|
|
5115
|
-
* @name DIRECTION_VERTICAL
|
|
5116
|
-
* @constant
|
|
5117
|
-
* @type {Number}
|
|
5157
|
+
/**
|
|
5158
|
+
* @name DIRECTION_VERTICAL
|
|
5159
|
+
* @constant
|
|
5160
|
+
* @type {Number}
|
|
5118
5161
|
*/
|
|
5119
5162
|
Axes.DIRECTION_VERTICAL = DIRECTION_VERTICAL;
|
|
5120
|
-
/**
|
|
5121
|
-
* @name DIRECTION_ALL
|
|
5122
|
-
* @constant
|
|
5123
|
-
* @type {Number}
|
|
5163
|
+
/**
|
|
5164
|
+
* @name DIRECTION_ALL
|
|
5165
|
+
* @constant
|
|
5166
|
+
* @type {Number}
|
|
5124
5167
|
*/
|
|
5125
5168
|
Axes.DIRECTION_ALL = DIRECTION_ALL;
|
|
5126
5169
|
__decorate([Computed], Axes.prototype, "holding", null);
|
|
@@ -5128,9 +5171,9 @@ version: 4.12.0-beta.5
|
|
|
5128
5171
|
return Axes;
|
|
5129
5172
|
}(Component);
|
|
5130
5173
|
|
|
5131
|
-
/*
|
|
5132
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
5133
|
-
* egjs projects are licensed under the MIT license
|
|
5174
|
+
/*
|
|
5175
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5176
|
+
* egjs projects are licensed under the MIT license
|
|
5134
5177
|
*/
|
|
5135
5178
|
// get user's direction
|
|
5136
5179
|
var getDirectionByAngle = function (angle, thresholdAngle) {
|
|
@@ -5140,73 +5183,73 @@ version: 4.12.0-beta.5
|
|
|
5140
5183
|
var toAngle = Math.abs(angle);
|
|
5141
5184
|
return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
|
|
5142
5185
|
};
|
|
5143
|
-
/**
|
|
5144
|
-
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5145
|
-
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
5146
|
-
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
5147
|
-
* - touch: Touch screen
|
|
5148
|
-
* - mouse: Mouse
|
|
5149
|
-
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
5150
|
-
* - touch: 터치 입력 장치
|
|
5151
|
-
* - mouse: 마우스
|
|
5152
|
-
* - pointer: 마우스 및 터치</ko>
|
|
5153
|
-
* @param {String[]} [inputKey=["any"]] List of key combinations to allow input
|
|
5154
|
-
* - any: any key
|
|
5155
|
-
* - shift: shift key
|
|
5156
|
-
* - ctrl: ctrl key and pinch gesture on the trackpad
|
|
5157
|
-
* - alt: alt key
|
|
5158
|
-
* - meta: meta key
|
|
5159
|
-
* - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
|
|
5160
|
-
* - any: 아무 키
|
|
5161
|
-
* - shift: shift 키
|
|
5162
|
-
* - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
|
|
5163
|
-
* - alt: alt 키
|
|
5164
|
-
* - meta: meta 키
|
|
5165
|
-
* - none: 아무 키도 눌리지 않은 상태 </ko>
|
|
5166
|
-
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
5167
|
-
* - left: Left mouse button and normal touch
|
|
5168
|
-
* - middle: Mouse wheel press
|
|
5169
|
-
* - right: Right mouse button <ko>입력을 허용할 버튼 목록
|
|
5170
|
-
* - left: 마우스 왼쪽 버튼
|
|
5171
|
-
* - middle: 마우스 휠 눌림
|
|
5172
|
-
* - right: 마우스 오른쪽 버튼 </ko>
|
|
5173
|
-
* @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
|
|
5174
|
-
* @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
|
|
5175
|
-
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5176
|
-
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5177
|
-
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5178
|
-
* @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>
|
|
5179
|
-
* @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>
|
|
5180
|
-
* @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>
|
|
5181
|
-
* @param {String} [touchAction=null] Value that overrides the element's "touch-action" css property. If set to null, it is automatically set to prevent scrolling in the direction of the connected axis. <ko>엘리먼트의 "touch-action" CSS 속성을 덮어쓰는 값. 만약 null로 설정된 경우, 연결된 축 방향으로의 스크롤을 방지하게끔 자동으로 설정된다.</ko>
|
|
5186
|
+
/**
|
|
5187
|
+
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5188
|
+
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
5189
|
+
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
5190
|
+
* - touch: Touch screen
|
|
5191
|
+
* - mouse: Mouse
|
|
5192
|
+
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
5193
|
+
* - touch: 터치 입력 장치
|
|
5194
|
+
* - mouse: 마우스
|
|
5195
|
+
* - pointer: 마우스 및 터치</ko>
|
|
5196
|
+
* @param {String[]} [inputKey=["any"]] List of key combinations to allow input
|
|
5197
|
+
* - any: any key
|
|
5198
|
+
* - shift: shift key
|
|
5199
|
+
* - ctrl: ctrl key and pinch gesture on the trackpad
|
|
5200
|
+
* - alt: alt key
|
|
5201
|
+
* - meta: meta key
|
|
5202
|
+
* - none: none of these keys are pressed <ko>입력을 허용할 키 조합 목록
|
|
5203
|
+
* - any: 아무 키
|
|
5204
|
+
* - shift: shift 키
|
|
5205
|
+
* - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐
|
|
5206
|
+
* - alt: alt 키
|
|
5207
|
+
* - meta: meta 키
|
|
5208
|
+
* - none: 아무 키도 눌리지 않은 상태 </ko>
|
|
5209
|
+
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
5210
|
+
* - left: Left mouse button and normal touch
|
|
5211
|
+
* - middle: Mouse wheel press
|
|
5212
|
+
* - right: Right mouse button <ko>입력을 허용할 버튼 목록
|
|
5213
|
+
* - left: 마우스 왼쪽 버튼
|
|
5214
|
+
* - middle: 마우스 휠 눌림
|
|
5215
|
+
* - right: 마우스 오른쪽 버튼 </ko>
|
|
5216
|
+
* @param {Number[]} [scale] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
|
|
5217
|
+
* @param {Number} [scale[0]=1] horizontal axis scale <ko>수평축 배율</ko>
|
|
5218
|
+
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5219
|
+
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5220
|
+
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5221
|
+
* @param {Boolean} [preventClickOnDrag=false] Whether to cancel the {@link https://developer.mozilla.org/en/docs/Web/API/Element/click_event click} event when the user finishes dragging more than 1 pixel <ko>사용자가 1픽셀 이상 드래그를 마쳤을 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트 취소 여부</ko>
|
|
5222
|
+
* @param {Boolean} [preventDefaultOnDrag=false] Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging <ko>사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부</ko>
|
|
5223
|
+
* @param {Number} [iOSEdgeSwipeThreshold=30] Area (px) that can go to the next page when swiping the right edge in iOS safari <ko>iOS Safari에서 오른쪽 엣지를 스와이프 하는 경우 다음 페이지로 넘어갈 수 있는 영역(px)</ko>
|
|
5224
|
+
* @param {String} [touchAction=null] Value that overrides the element's "touch-action" css property. If set to null, it is automatically set to prevent scrolling in the direction of the connected axis. <ko>엘리먼트의 "touch-action" CSS 속성을 덮어쓰는 값. 만약 null로 설정된 경우, 연결된 축 방향으로의 스크롤을 방지하게끔 자동으로 설정된다.</ko>
|
|
5182
5225
|
**/
|
|
5183
|
-
/**
|
|
5184
|
-
* 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.
|
|
5185
|
-
* @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
|
|
5186
|
-
*
|
|
5187
|
-
* @example
|
|
5188
|
-
* ```js
|
|
5189
|
-
* const pan = new eg.Axes.PanInput("#area", {
|
|
5190
|
-
* inputType: ["touch"],
|
|
5191
|
-
* scale: [1, 1.3],
|
|
5192
|
-
* });
|
|
5193
|
-
*
|
|
5194
|
-
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5195
|
-
* // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5196
|
-
* axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
|
|
5197
|
-
*
|
|
5198
|
-
* // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5199
|
-
* axes.connect(["something1"], pan); // or axes.connect("something1", pan);
|
|
5200
|
-
*
|
|
5201
|
-
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5202
|
-
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5203
|
-
* ```
|
|
5204
|
-
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5205
|
-
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5226
|
+
/**
|
|
5227
|
+
* A module that passes the amount of change to eg.Axes when the mouse or touchscreen is down and moved. use less than two axes.
|
|
5228
|
+
* @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다.
|
|
5229
|
+
*
|
|
5230
|
+
* @example
|
|
5231
|
+
* ```js
|
|
5232
|
+
* const pan = new eg.Axes.PanInput("#area", {
|
|
5233
|
+
* inputType: ["touch"],
|
|
5234
|
+
* scale: [1, 1.3],
|
|
5235
|
+
* });
|
|
5236
|
+
*
|
|
5237
|
+
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5238
|
+
* // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5239
|
+
* axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan);
|
|
5240
|
+
*
|
|
5241
|
+
* // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
5242
|
+
* axes.connect(["something1"], pan); // or axes.connect("something1", pan);
|
|
5243
|
+
*
|
|
5244
|
+
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5245
|
+
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5246
|
+
* ```
|
|
5247
|
+
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5248
|
+
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5206
5249
|
*/
|
|
5207
5250
|
var PanInput = /*#__PURE__*/function () {
|
|
5208
|
-
/**
|
|
5209
|
-
*
|
|
5251
|
+
/**
|
|
5252
|
+
*
|
|
5210
5253
|
*/
|
|
5211
5254
|
function PanInput(el, options) {
|
|
5212
5255
|
var _this = this;
|
|
@@ -5255,56 +5298,60 @@ version: 4.12.0-beta.5
|
|
|
5255
5298
|
this._detachWindowEvent(this._activeEvent);
|
|
5256
5299
|
}
|
|
5257
5300
|
this._attachElementEvent(observer);
|
|
5258
|
-
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5259
5301
|
return this;
|
|
5260
5302
|
};
|
|
5261
5303
|
__proto.disconnect = function () {
|
|
5262
5304
|
this._detachElementEvent();
|
|
5263
5305
|
this._detachWindowEvent(this._activeEvent);
|
|
5264
|
-
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5265
|
-
revertCssProps(this.element, this._originalCssProps);
|
|
5266
|
-
}
|
|
5267
5306
|
this._direction = DIRECTION_NONE;
|
|
5268
5307
|
return this;
|
|
5269
5308
|
};
|
|
5270
|
-
/**
|
|
5271
|
-
* Destroys elements, properties, and events used in a module.
|
|
5272
|
-
* @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
|
|
5309
|
+
/**
|
|
5310
|
+
* Destroys elements, properties, and events used in a module.
|
|
5311
|
+
* @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다.
|
|
5273
5312
|
*/
|
|
5274
5313
|
__proto.destroy = function () {
|
|
5275
5314
|
this.disconnect();
|
|
5276
5315
|
this.element = null;
|
|
5277
5316
|
};
|
|
5278
|
-
/**
|
|
5279
|
-
* Enables input devices
|
|
5280
|
-
* @ko 입력 장치를 사용할 수 있게 한다
|
|
5281
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5317
|
+
/**
|
|
5318
|
+
* Enables input devices
|
|
5319
|
+
* @ko 입력 장치를 사용할 수 있게 한다
|
|
5320
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5282
5321
|
*/
|
|
5283
5322
|
__proto.enable = function () {
|
|
5284
|
-
this._enabled
|
|
5323
|
+
if (!this._enabled) {
|
|
5324
|
+
this._enabled = true;
|
|
5325
|
+
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5326
|
+
}
|
|
5285
5327
|
return this;
|
|
5286
5328
|
};
|
|
5287
|
-
/**
|
|
5288
|
-
* Disables input devices
|
|
5289
|
-
* @ko 입력 장치를 사용할 수 없게 한다.
|
|
5290
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5329
|
+
/**
|
|
5330
|
+
* Disables input devices
|
|
5331
|
+
* @ko 입력 장치를 사용할 수 없게 한다.
|
|
5332
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5291
5333
|
*/
|
|
5292
5334
|
__proto.disable = function () {
|
|
5293
|
-
this._enabled
|
|
5335
|
+
if (this._enabled) {
|
|
5336
|
+
this._enabled = false;
|
|
5337
|
+
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5338
|
+
revertCssProps(this.element, this._originalCssProps);
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5294
5341
|
return this;
|
|
5295
5342
|
};
|
|
5296
|
-
/**
|
|
5297
|
-
* Returns whether to use an input device
|
|
5298
|
-
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5299
|
-
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5343
|
+
/**
|
|
5344
|
+
* Returns whether to use an input device
|
|
5345
|
+
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5346
|
+
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5300
5347
|
*/
|
|
5301
5348
|
__proto.isEnabled = function () {
|
|
5302
5349
|
return this._enabled;
|
|
5303
5350
|
};
|
|
5304
|
-
/**
|
|
5305
|
-
* Releases current user input.
|
|
5306
|
-
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5307
|
-
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5351
|
+
/**
|
|
5352
|
+
* Releases current user input.
|
|
5353
|
+
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5354
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5308
5355
|
*/
|
|
5309
5356
|
__proto.release = function () {
|
|
5310
5357
|
var activeEvent = this._activeEvent;
|
|
@@ -5447,7 +5494,7 @@ version: 4.12.0-beta.5
|
|
|
5447
5494
|
throw new Error("Element to connect input does not exist.");
|
|
5448
5495
|
}
|
|
5449
5496
|
this._observer = observer;
|
|
5450
|
-
this.
|
|
5497
|
+
this.enable();
|
|
5451
5498
|
this._activeEvent = activeEvent;
|
|
5452
5499
|
element.addEventListener("click", this._preventClickWhenDragged, true);
|
|
5453
5500
|
activeEvent.start.forEach(function (event) {
|
|
@@ -5471,15 +5518,15 @@ version: 4.12.0-beta.5
|
|
|
5471
5518
|
element.removeEventListener(event, _this._voidFunction);
|
|
5472
5519
|
});
|
|
5473
5520
|
}
|
|
5474
|
-
this.
|
|
5521
|
+
this.disable();
|
|
5475
5522
|
this._observer = null;
|
|
5476
5523
|
};
|
|
5477
5524
|
return PanInput;
|
|
5478
5525
|
}();
|
|
5479
5526
|
|
|
5480
|
-
/*
|
|
5481
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
5482
|
-
* egjs projects are licensed under the MIT license
|
|
5527
|
+
/*
|
|
5528
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5529
|
+
* egjs projects are licensed under the MIT license
|
|
5483
5530
|
*/
|
|
5484
5531
|
|
|
5485
5532
|
var Axes$1 = Axes;
|
|
@@ -7933,7 +7980,6 @@ version: 4.12.0-beta.5
|
|
|
7933
7980
|
var _this = this;
|
|
7934
7981
|
var _b = (_a === void 0 ? {} : _a).align,
|
|
7935
7982
|
align = _b === void 0 ? ALIGN.CENTER : _b;
|
|
7936
|
-
this._lookedOffset = 0;
|
|
7937
7983
|
this._checkTranslateSupport = function () {
|
|
7938
7984
|
var e_1, _a;
|
|
7939
7985
|
var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
|
|
@@ -8293,8 +8339,6 @@ version: 4.12.0-beta.5
|
|
|
8293
8339
|
*/
|
|
8294
8340
|
__proto.lookAt = function (pos) {
|
|
8295
8341
|
var _this = this;
|
|
8296
|
-
var prevOffset = this._offset;
|
|
8297
|
-
var isChangedOffset = this._lookedOffset !== prevOffset;
|
|
8298
8342
|
var flicking = getFlickingAttached(this._flicking);
|
|
8299
8343
|
var prevPos = this._position;
|
|
8300
8344
|
this._position = pos;
|
|
@@ -8305,12 +8349,7 @@ version: 4.12.0-beta.5
|
|
|
8305
8349
|
if (toggled) {
|
|
8306
8350
|
void flicking.renderer.render().then(function () {
|
|
8307
8351
|
_this.updateOffset();
|
|
8308
|
-
_this._lookedOffset = _this._offset;
|
|
8309
8352
|
});
|
|
8310
|
-
} else if (isChangedOffset) {
|
|
8311
|
-
// sync offset for renderOnlyVisible on resize
|
|
8312
|
-
this.updateOffset();
|
|
8313
|
-
this._lookedOffset = this._offset;
|
|
8314
8353
|
} else {
|
|
8315
8354
|
this.applyTransform();
|
|
8316
8355
|
}
|
|
@@ -8485,8 +8524,8 @@ version: 4.12.0-beta.5
|
|
|
8485
8524
|
return this;
|
|
8486
8525
|
};
|
|
8487
8526
|
/**
|
|
8488
|
-
* Update Viewport's height to
|
|
8489
|
-
* @ko 현재
|
|
8527
|
+
* Update Viewport's height to active panel's height
|
|
8528
|
+
* @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다
|
|
8490
8529
|
* @throws {FlickingError}
|
|
8491
8530
|
* {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before
|
|
8492
8531
|
* <ko>{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우</ko>
|
|
@@ -8496,17 +8535,9 @@ version: 4.12.0-beta.5
|
|
|
8496
8535
|
__proto.updateAdaptiveHeight = function () {
|
|
8497
8536
|
var flicking = getFlickingAttached(this._flicking);
|
|
8498
8537
|
var activePanel = flicking.control.activePanel;
|
|
8499
|
-
|
|
8500
|
-
var selectedPanels = __spread$1(visiblePanels);
|
|
8501
|
-
if (activePanel) {
|
|
8502
|
-
selectedPanels.push(activePanel);
|
|
8503
|
-
}
|
|
8504
|
-
if (!flicking.horizontal || !flicking.adaptive || !selectedPanels.length) return;
|
|
8505
|
-
var maxHeight = Math.max.apply(Math, __spread$1(selectedPanels.map(function (panel) {
|
|
8506
|
-
return panel.height;
|
|
8507
|
-
})));
|
|
8538
|
+
if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;
|
|
8508
8539
|
flicking.viewport.setSize({
|
|
8509
|
-
height:
|
|
8540
|
+
height: activePanel.height
|
|
8510
8541
|
});
|
|
8511
8542
|
};
|
|
8512
8543
|
/**
|
|
@@ -8577,7 +8608,6 @@ version: 4.12.0-beta.5
|
|
|
8577
8608
|
};
|
|
8578
8609
|
__proto._resetInternalValues = function () {
|
|
8579
8610
|
this._position = 0;
|
|
8580
|
-
this._lookedOffset = 0;
|
|
8581
8611
|
this._alignPos = 0;
|
|
8582
8612
|
this._offset = 0;
|
|
8583
8613
|
this._circularOffset = 0;
|
|
@@ -12996,10 +13026,323 @@ version: 4.12.0-beta.5
|
|
|
12996
13026
|
* Flicking.VERSION; // ex) 4.0.0
|
|
12997
13027
|
* ```
|
|
12998
13028
|
*/
|
|
12999
|
-
Flicking.VERSION = "4.12.0-beta.
|
|
13029
|
+
Flicking.VERSION = "4.12.0-beta.7";
|
|
13000
13030
|
return Flicking;
|
|
13001
13031
|
}(Component);
|
|
13002
13032
|
|
|
13033
|
+
/*
|
|
13034
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
13035
|
+
* egjs projects are licensed under the MIT license
|
|
13036
|
+
*/
|
|
13037
|
+
/**
|
|
13038
|
+
* @extends Component
|
|
13039
|
+
* @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"}
|
|
13040
|
+
* @requires {@link https://github.com/naver/egjs-component|@egjs/component}
|
|
13041
|
+
* @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}
|
|
13042
|
+
*/
|
|
13043
|
+
var CrossFlicking = /*#__PURE__*/function (_super) {
|
|
13044
|
+
__extends$3(CrossFlicking, _super);
|
|
13045
|
+
// Options Setter
|
|
13046
|
+
// public set align(val: FlickingOptions["align"]) {
|
|
13047
|
+
// this._align = val;
|
|
13048
|
+
// }
|
|
13049
|
+
function CrossFlicking(root, options) {
|
|
13050
|
+
if (options === void 0) {
|
|
13051
|
+
options = {};
|
|
13052
|
+
}
|
|
13053
|
+
var _this = _super.call(this, root, options) || this;
|
|
13054
|
+
_this._onHorizontalHoldStart = function () {
|
|
13055
|
+
_this.dragThreshold = 10;
|
|
13056
|
+
_this._moveDirection = null;
|
|
13057
|
+
};
|
|
13058
|
+
_this._onHorizontalMove = function (e) {
|
|
13059
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
13060
|
+
_this._sideFlicking.forEach(function (child) {
|
|
13061
|
+
child.dragThreshold = Infinity;
|
|
13062
|
+
});
|
|
13063
|
+
_this._moveDirection = MOVE_DIRECTION.HORIZONTAL;
|
|
13064
|
+
}
|
|
13065
|
+
};
|
|
13066
|
+
_this._onHorizontalMoveEnd = function (e) {
|
|
13067
|
+
var visiblePanels = _this.visiblePanels;
|
|
13068
|
+
_this._sideFlicking.forEach(function (child) {
|
|
13069
|
+
child.dragThreshold = 10;
|
|
13070
|
+
});
|
|
13071
|
+
_this._moveDirection = null;
|
|
13072
|
+
if (visiblePanels.length > 1) {
|
|
13073
|
+
_this._nextIndex = e.direction === "NEXT" ? visiblePanels[1].index : visiblePanels[0].index;
|
|
13074
|
+
} else {
|
|
13075
|
+
_this._nextIndex = visiblePanels[0].index;
|
|
13076
|
+
}
|
|
13077
|
+
// _syncToCategory에서 완전히 가로 이동이 이루어지기 전에 세로 방향 index가 변하는 경우가 있어 timeout으로 처리
|
|
13078
|
+
_this._sideFlicking.forEach(function (child, i) {
|
|
13079
|
+
if (_this._nextIndex !== i) {
|
|
13080
|
+
var _a = _this._sideState[i],
|
|
13081
|
+
start = _a.start,
|
|
13082
|
+
end = _a.end;
|
|
13083
|
+
if (child.index < start) {
|
|
13084
|
+
child.stopAnimation();
|
|
13085
|
+
void child.moveTo(start, 0);
|
|
13086
|
+
} else if (child.index > end) {
|
|
13087
|
+
child.stopAnimation();
|
|
13088
|
+
void child.moveTo(end, 0);
|
|
13089
|
+
}
|
|
13090
|
+
}
|
|
13091
|
+
});
|
|
13092
|
+
if (e.isTrusted) {
|
|
13093
|
+
_this._syncToCategory(_this._sideFlicking[_this._nextIndex].index, _this._nextIndex);
|
|
13094
|
+
}
|
|
13095
|
+
};
|
|
13096
|
+
_this._onSideHoldStart = function () {
|
|
13097
|
+
_this._sideFlicking.forEach(function (child) {
|
|
13098
|
+
child.dragThreshold = 10;
|
|
13099
|
+
});
|
|
13100
|
+
_this._moveDirection = null;
|
|
13101
|
+
};
|
|
13102
|
+
_this._onSideMove = function (e) {
|
|
13103
|
+
if (e.isTrusted && !_this._moveDirection) {
|
|
13104
|
+
_this.dragThreshold = Infinity;
|
|
13105
|
+
_this._moveDirection = MOVE_DIRECTION.VERTICAL;
|
|
13106
|
+
}
|
|
13107
|
+
};
|
|
13108
|
+
_this._onSideMoveEnd = function () {
|
|
13109
|
+
_this.dragThreshold = 10;
|
|
13110
|
+
_this._moveDirection = null;
|
|
13111
|
+
};
|
|
13112
|
+
_this._onSideChanged = function (e) {
|
|
13113
|
+
// this.visiblePanels.length 가 2보다 크다면 가로 방향 Flicking이 조작 중이라는 것을 의미합니다.
|
|
13114
|
+
// 이 경우 가로 방향 Flicking의 이동이 완전히 끝난 뒤 _onHorizontalMoveEnd 에서 syncToCategory할 것이므로 여기서는 하지 않습니다.
|
|
13115
|
+
if (_this.visiblePanels.length < 2 && _this._sideFlicking[_this.index] === e.currentTarget) {
|
|
13116
|
+
_this._syncToCategory(e.index, _this.index);
|
|
13117
|
+
}
|
|
13118
|
+
};
|
|
13119
|
+
// Internal states
|
|
13120
|
+
_this._sideState = _this._createSideState();
|
|
13121
|
+
_this._moveDirection = null;
|
|
13122
|
+
_this._nextIndex = 0;
|
|
13123
|
+
// Bind options
|
|
13124
|
+
_this._sideOptions = options.sideOptions;
|
|
13125
|
+
// Create core components
|
|
13126
|
+
_this._sideFlicking = _this._createSideFlicking();
|
|
13127
|
+
return _this;
|
|
13128
|
+
}
|
|
13129
|
+
var __proto = CrossFlicking.prototype;
|
|
13130
|
+
Object.defineProperty(__proto, "sideFlicking", {
|
|
13131
|
+
// Components
|
|
13132
|
+
/**
|
|
13133
|
+
* {@link Control} instance of the Flicking
|
|
13134
|
+
* @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스
|
|
13135
|
+
* @type {Control}
|
|
13136
|
+
* @default SnapControl
|
|
13137
|
+
* @readonly
|
|
13138
|
+
* @see Control
|
|
13139
|
+
* @see SnapControl
|
|
13140
|
+
* @see FreeControl
|
|
13141
|
+
*/
|
|
13142
|
+
get: function () {
|
|
13143
|
+
return this._sideFlicking;
|
|
13144
|
+
},
|
|
13145
|
+
enumerable: false,
|
|
13146
|
+
configurable: true
|
|
13147
|
+
});
|
|
13148
|
+
Object.defineProperty(__proto, "sideState", {
|
|
13149
|
+
// Internal States
|
|
13150
|
+
/**
|
|
13151
|
+
* Whether Flicking's {@link Flicking#init init()} is called.
|
|
13152
|
+
* This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.
|
|
13153
|
+
* @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.
|
|
13154
|
+
* 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.
|
|
13155
|
+
* @type {boolean}
|
|
13156
|
+
* @default false
|
|
13157
|
+
* @readonly
|
|
13158
|
+
*/
|
|
13159
|
+
get: function () {
|
|
13160
|
+
return this._sideState;
|
|
13161
|
+
},
|
|
13162
|
+
enumerable: false,
|
|
13163
|
+
configurable: true
|
|
13164
|
+
});
|
|
13165
|
+
Object.defineProperty(__proto, "sideOptions", {
|
|
13166
|
+
// Options Getter
|
|
13167
|
+
/**
|
|
13168
|
+
* Change active panel index on mouse/touch hold while animating.
|
|
13169
|
+
* `index` of the `willChange`/`willRestore` event will be used as new index.
|
|
13170
|
+
* @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.
|
|
13171
|
+
* `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.
|
|
13172
|
+
* @type {FlickingOptions}
|
|
13173
|
+
* @default undefined
|
|
13174
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}
|
|
13175
|
+
*/
|
|
13176
|
+
get: function () {
|
|
13177
|
+
return this._sideOptions;
|
|
13178
|
+
},
|
|
13179
|
+
enumerable: false,
|
|
13180
|
+
configurable: true
|
|
13181
|
+
});
|
|
13182
|
+
/**
|
|
13183
|
+
* Initialize Flicking and move to the default index
|
|
13184
|
+
* This is automatically called on Flicking's constructor when `autoInit` is true(default)
|
|
13185
|
+
* @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다
|
|
13186
|
+
* 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다
|
|
13187
|
+
* @fires Flicking#ready
|
|
13188
|
+
* @return {Promise<void>}
|
|
13189
|
+
*/
|
|
13190
|
+
__proto.init = function () {
|
|
13191
|
+
var _this = this;
|
|
13192
|
+
return _super.prototype.init.call(this).then(function () {
|
|
13193
|
+
return _this._addComponentEvents();
|
|
13194
|
+
});
|
|
13195
|
+
};
|
|
13196
|
+
/**
|
|
13197
|
+
* Destroy Flicking and remove all event handlers
|
|
13198
|
+
* @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다
|
|
13199
|
+
* @return {void}
|
|
13200
|
+
*/
|
|
13201
|
+
__proto.destroy = function () {
|
|
13202
|
+
// TODO 모든 child flicking destroy
|
|
13203
|
+
_super.prototype.destroy.call(this);
|
|
13204
|
+
};
|
|
13205
|
+
__proto._addComponentEvents = function () {
|
|
13206
|
+
var _this = this;
|
|
13207
|
+
this.on(EVENTS.HOLD_START, this._onHorizontalHoldStart);
|
|
13208
|
+
this.on(EVENTS.MOVE, this._onHorizontalMove);
|
|
13209
|
+
this.on(EVENTS.MOVE_END, this._onHorizontalMoveEnd);
|
|
13210
|
+
this._sideFlicking.forEach(function (flicking) {
|
|
13211
|
+
flicking.on(EVENTS.HOLD_START, _this._onSideHoldStart);
|
|
13212
|
+
flicking.on(EVENTS.MOVE, _this._onSideMove);
|
|
13213
|
+
flicking.on(EVENTS.MOVE_END, _this._onSideMoveEnd);
|
|
13214
|
+
flicking.on(EVENTS.CHANGED, _this._onSideChanged);
|
|
13215
|
+
});
|
|
13216
|
+
};
|
|
13217
|
+
__proto._createSideState = function () {
|
|
13218
|
+
var _this = this;
|
|
13219
|
+
// data-index로 분류하기 전에 임시로 모든 children에 대해 side flicking으로 해보자.
|
|
13220
|
+
// panels에 data-attributes가 붙어있을 때와 안 붙어있을 때를 다르게 처리
|
|
13221
|
+
// 붙어있다면 가상의 viewport들을 index 갯수만큼 만들어줘야 한다
|
|
13222
|
+
var viewportEl = this.element;
|
|
13223
|
+
var cameraEl = this.camera.element;
|
|
13224
|
+
var panels = toArray$2(cameraEl.children);
|
|
13225
|
+
var sideState = [];
|
|
13226
|
+
var sidePanels = "";
|
|
13227
|
+
// check data attribute exists
|
|
13228
|
+
var groupKeys = [];
|
|
13229
|
+
var groupPanels = {};
|
|
13230
|
+
var sideCamera = document.createElement("div");
|
|
13231
|
+
sideCamera.classList.add(CLASS.CAMERA);
|
|
13232
|
+
var isCrossStructure = getDataAttributes(viewportEl, "data-cross-").structure;
|
|
13233
|
+
if (!isCrossStructure) {
|
|
13234
|
+
viewportEl.setAttribute("data-cross-structure", "true");
|
|
13235
|
+
panels.forEach(function (panel) {
|
|
13236
|
+
var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
|
|
13237
|
+
if (groupKey && !includes(groupKeys, groupKey)) {
|
|
13238
|
+
groupKeys.push(groupKey);
|
|
13239
|
+
groupPanels[groupKey] = [panel];
|
|
13240
|
+
} else if (groupKey) {
|
|
13241
|
+
groupPanels[groupKey].push(panel);
|
|
13242
|
+
}
|
|
13243
|
+
});
|
|
13244
|
+
if (groupKeys.length) {
|
|
13245
|
+
sideState = groupKeys.reduce(function (state, key) {
|
|
13246
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13247
|
+
var element = groupPanels[key].reduce(function (el, panel) {
|
|
13248
|
+
sidePanels += panel.outerHTML;
|
|
13249
|
+
el.innerHTML += panel.outerHTML;
|
|
13250
|
+
return el;
|
|
13251
|
+
}, document.createElement("div"));
|
|
13252
|
+
return __spread$1(state, [{
|
|
13253
|
+
key: key,
|
|
13254
|
+
start: start,
|
|
13255
|
+
end: start + groupPanels[key].length - 1,
|
|
13256
|
+
element: element
|
|
13257
|
+
}]);
|
|
13258
|
+
}, []);
|
|
13259
|
+
this.remove(0, this.panelCount - groupKeys.length);
|
|
13260
|
+
sideState.forEach(function (_, i) {
|
|
13261
|
+
var panel = _this.camera.children[i];
|
|
13262
|
+
Array.from(panel.attributes).forEach(function (attribute) {
|
|
13263
|
+
return panel.removeAttribute(attribute.name);
|
|
13264
|
+
});
|
|
13265
|
+
});
|
|
13266
|
+
} else {
|
|
13267
|
+
sideState = panels.reduce(function (state, panel, i) {
|
|
13268
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13269
|
+
sidePanels += panel.innerHTML;
|
|
13270
|
+
return __spread$1(state, [{
|
|
13271
|
+
key: i.toString(),
|
|
13272
|
+
start: start,
|
|
13273
|
+
end: start + panel.children.length - 1,
|
|
13274
|
+
element: panel
|
|
13275
|
+
}]);
|
|
13276
|
+
}, []);
|
|
13277
|
+
}
|
|
13278
|
+
sideCamera.innerHTML = sidePanels;
|
|
13279
|
+
sideState.forEach(function (_, i) {
|
|
13280
|
+
var panel = _this.camera.children[i];
|
|
13281
|
+
[CLASS.VIEWPORT, CLASS.VERTICAL].forEach(function (className) {
|
|
13282
|
+
if (!panel.classList.contains(className)) {
|
|
13283
|
+
panel.classList.add(className);
|
|
13284
|
+
}
|
|
13285
|
+
});
|
|
13286
|
+
panel.innerHTML = sideCamera.outerHTML;
|
|
13287
|
+
});
|
|
13288
|
+
} else {
|
|
13289
|
+
toArray$2(panels[0].children[0].children).forEach(function (panel) {
|
|
13290
|
+
var groupKey = getDataAttributes(panel, "data-cross-").groupkey;
|
|
13291
|
+
if (groupKey && !includes(groupKeys, groupKey)) {
|
|
13292
|
+
groupKeys.push(groupKey);
|
|
13293
|
+
groupPanels[groupKey] = [panel];
|
|
13294
|
+
} else if (groupKey) {
|
|
13295
|
+
groupPanels[groupKey].push(panel);
|
|
13296
|
+
}
|
|
13297
|
+
});
|
|
13298
|
+
sideState = groupKeys.reduce(function (state, key) {
|
|
13299
|
+
var start = state.length ? +state[state.length - 1].end + 1 : 0;
|
|
13300
|
+
var element = groupPanels[key].reduce(function (el, panel) {
|
|
13301
|
+
el.innerHTML += panel.outerHTML;
|
|
13302
|
+
return el;
|
|
13303
|
+
}, document.createElement("div"));
|
|
13304
|
+
return __spread$1(state, [{
|
|
13305
|
+
key: key,
|
|
13306
|
+
start: start,
|
|
13307
|
+
end: start + groupPanels[key].length - 1,
|
|
13308
|
+
element: element
|
|
13309
|
+
}]);
|
|
13310
|
+
}, []);
|
|
13311
|
+
}
|
|
13312
|
+
return sideState;
|
|
13313
|
+
};
|
|
13314
|
+
__proto._createSideFlicking = function () {
|
|
13315
|
+
var _this = this;
|
|
13316
|
+
return this.sideState.map(function (state, i) {
|
|
13317
|
+
return new Flicking(_this.camera.children[i], __assign$2(__assign$2({}, _this.sideOptions), {
|
|
13318
|
+
horizontal: false,
|
|
13319
|
+
panelsPerView: 1,
|
|
13320
|
+
defaultIndex: state.start
|
|
13321
|
+
}));
|
|
13322
|
+
});
|
|
13323
|
+
};
|
|
13324
|
+
__proto._syncToCategory = function (index, outerIndex) {
|
|
13325
|
+
var _this = this;
|
|
13326
|
+
this.stopAnimation();
|
|
13327
|
+
this._sideFlicking.forEach(function (child, i) {
|
|
13328
|
+
var _a = _this._sideState[i],
|
|
13329
|
+
start = _a.start,
|
|
13330
|
+
end = _a.end;
|
|
13331
|
+
if (start <= index && end >= index && outerIndex !== i) {
|
|
13332
|
+
child.stopAnimation();
|
|
13333
|
+
void child.moveTo(index, 0);
|
|
13334
|
+
void _this.moveTo(i, 0);
|
|
13335
|
+
}
|
|
13336
|
+
});
|
|
13337
|
+
};
|
|
13338
|
+
return CrossFlicking;
|
|
13339
|
+
}(Flicking);
|
|
13340
|
+
|
|
13341
|
+
var CrossFlicking$1 = {
|
|
13342
|
+
__proto__: null,
|
|
13343
|
+
CrossFlicking: CrossFlicking
|
|
13344
|
+
};
|
|
13345
|
+
|
|
13003
13346
|
/*
|
|
13004
13347
|
* Copyright (c) 2015 NAVER Corp.
|
|
13005
13348
|
* egjs projects are licensed under the MIT license
|
|
@@ -13245,6 +13588,7 @@ version: 4.12.0-beta.5
|
|
|
13245
13588
|
merge(Flicking, Constants);
|
|
13246
13589
|
merge(Flicking, CFC);
|
|
13247
13590
|
merge(Flicking, Utils);
|
|
13591
|
+
merge(Flicking, CrossFlicking$1);
|
|
13248
13592
|
|
|
13249
13593
|
return Flicking;
|
|
13250
13594
|
|