@egjs/flicking 4.9.1 → 4.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declaration/control/AxesController.d.ts +1 -0
- package/declaration/control/Control.d.ts +1 -0
- package/dist/flicking.esm.js +33 -2
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +33 -2
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +400 -205
- 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 +2 -2
- package/src/Flicking.ts +4 -0
- package/src/control/AxesController.ts +12 -0
- package/src/control/Control.ts +12 -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.9.
|
|
7
|
+
version: 4.9.2
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1087,7 +1087,7 @@ version: 4.9.1
|
|
|
1087
1087
|
var parsePanelAlign = function (align) {
|
|
1088
1088
|
return typeof align === "object" ? align.panel : align;
|
|
1089
1089
|
};
|
|
1090
|
-
var getDirection = function (start, end) {
|
|
1090
|
+
var getDirection$1 = function (start, end) {
|
|
1091
1091
|
if (start === end) return DIRECTION.NONE;
|
|
1092
1092
|
return start < end ? DIRECTION.NEXT : DIRECTION.PREV;
|
|
1093
1093
|
};
|
|
@@ -1290,7 +1290,7 @@ version: 4.9.1
|
|
|
1290
1290
|
parseArithmeticExpression: parseArithmeticExpression,
|
|
1291
1291
|
parseCSSSizeValue: parseCSSSizeValue,
|
|
1292
1292
|
parsePanelAlign: parsePanelAlign,
|
|
1293
|
-
getDirection: getDirection,
|
|
1293
|
+
getDirection: getDirection$1,
|
|
1294
1294
|
parseElement: parseElement,
|
|
1295
1295
|
getMinusCompensatedIndex: getMinusCompensatedIndex,
|
|
1296
1296
|
includes: includes,
|
|
@@ -1950,7 +1950,7 @@ version: 4.9.1
|
|
|
1950
1950
|
license: MIT
|
|
1951
1951
|
author: NAVER Corp.
|
|
1952
1952
|
repository: git+https://github.com/naver/agent.git
|
|
1953
|
-
version: 2.
|
|
1953
|
+
version: 2.4.2
|
|
1954
1954
|
*/
|
|
1955
1955
|
function some(arr, callback) {
|
|
1956
1956
|
var length = arr.length;
|
|
@@ -1974,7 +1974,7 @@ version: 4.9.1
|
|
|
1974
1974
|
|
|
1975
1975
|
return null;
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1977
|
+
function getUserAgentString(agent) {
|
|
1978
1978
|
var userAgent = agent;
|
|
1979
1979
|
|
|
1980
1980
|
if (typeof userAgent === "undefined") {
|
|
@@ -2140,15 +2140,18 @@ version: 4.9.1
|
|
|
2140
2140
|
}, {
|
|
2141
2141
|
test: "windows nt",
|
|
2142
2142
|
id: "window"
|
|
2143
|
+
}, {
|
|
2144
|
+
test: "win32|windows",
|
|
2145
|
+
id: "window"
|
|
2143
2146
|
}, {
|
|
2144
2147
|
test: "iphone|ipad|ipod",
|
|
2145
2148
|
id: "ios",
|
|
2146
2149
|
versionTest: "iphone os|cpu os"
|
|
2147
2150
|
}, {
|
|
2148
|
-
test: "mac os x",
|
|
2151
|
+
test: "macos|macintel|mac os x",
|
|
2149
2152
|
id: "mac"
|
|
2150
2153
|
}, {
|
|
2151
|
-
test: "android",
|
|
2154
|
+
test: "android|linux armv81",
|
|
2152
2155
|
id: "android"
|
|
2153
2156
|
}, {
|
|
2154
2157
|
test: "tizen",
|
|
@@ -2158,85 +2161,17 @@ version: 4.9.1
|
|
|
2158
2161
|
id: "webos"
|
|
2159
2162
|
}];
|
|
2160
2163
|
|
|
2161
|
-
function
|
|
2162
|
-
|
|
2163
|
-
var brands = (userAgentData.uaList || userAgentData.brands).slice();
|
|
2164
|
-
var isMobile = userAgentData.mobile || false;
|
|
2165
|
-
var firstBrand = brands[0];
|
|
2166
|
-
var browser = {
|
|
2167
|
-
name: firstBrand.brand,
|
|
2168
|
-
version: firstBrand.version,
|
|
2169
|
-
majorVersion: -1,
|
|
2170
|
-
webkit: false,
|
|
2171
|
-
webkitVersion: "-1",
|
|
2172
|
-
chromium: false,
|
|
2173
|
-
chromiumVersion: "-1",
|
|
2174
|
-
webview: !!findPresetBrand(WEBVIEW_PRESETS, brands).brand
|
|
2175
|
-
};
|
|
2176
|
-
var os = {
|
|
2177
|
-
name: "unknown",
|
|
2178
|
-
version: "-1",
|
|
2179
|
-
majorVersion: -1
|
|
2180
|
-
};
|
|
2181
|
-
browser.webkit = !browser.chromium && some(WEBKIT_PRESETS, function (preset) {
|
|
2182
|
-
return findBrand(brands, preset);
|
|
2183
|
-
});
|
|
2184
|
-
var chromiumBrand = findPresetBrand(CHROMIUM_PRESETS, brands);
|
|
2185
|
-
browser.chromium = !!chromiumBrand.brand;
|
|
2186
|
-
browser.chromiumVersion = chromiumBrand.version;
|
|
2187
|
-
|
|
2188
|
-
if (!browser.chromium) {
|
|
2189
|
-
var webkitBrand = findPresetBrand(WEBKIT_PRESETS, brands);
|
|
2190
|
-
browser.webkit = !!webkitBrand.brand;
|
|
2191
|
-
browser.webkitVersion = webkitBrand.version;
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
if (osData) {
|
|
2195
|
-
var platform_1 = osData.platform.toLowerCase();
|
|
2196
|
-
var result = find(OS_PRESETS, function (preset) {
|
|
2197
|
-
return new RegExp("" + preset.test, "g").exec(platform_1);
|
|
2198
|
-
});
|
|
2199
|
-
os.name = result ? result.id : platform_1;
|
|
2200
|
-
os.version = osData.platformVersion;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
var browserBrand = findPresetBrand(BROWSER_PRESETS, brands);
|
|
2204
|
-
|
|
2205
|
-
if (browserBrand.brand) {
|
|
2206
|
-
browser.name = browserBrand.brand;
|
|
2207
|
-
browser.version = osData ? osData.uaFullVersion : browserBrand.version;
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
if (navigator.platform === "Linux armv8l") {
|
|
2211
|
-
os.name = "android";
|
|
2212
|
-
} else if (browser.webkit) {
|
|
2213
|
-
os.name = isMobile ? "ios" : "mac";
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
if (os.name === "ios" && browser.webview) {
|
|
2217
|
-
browser.version = "-1";
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
os.version = convertVersion(os.version);
|
|
2221
|
-
browser.version = convertVersion(browser.version);
|
|
2222
|
-
os.majorVersion = parseInt(os.version, 10);
|
|
2223
|
-
browser.majorVersion = parseInt(browser.version, 10);
|
|
2224
|
-
return {
|
|
2225
|
-
browser: browser,
|
|
2226
|
-
os: os,
|
|
2227
|
-
isMobile: isMobile,
|
|
2228
|
-
isHints: true
|
|
2229
|
-
};
|
|
2164
|
+
function isWebView(userAgent) {
|
|
2165
|
+
return !!findPreset(WEBVIEW_PRESETS, userAgent).preset;
|
|
2230
2166
|
}
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
var nextAgent = getUserAgent(userAgent);
|
|
2167
|
+
function getLegacyAgent(userAgent) {
|
|
2168
|
+
var nextAgent = getUserAgentString(userAgent);
|
|
2234
2169
|
var isMobile = !!/mobi/g.exec(nextAgent);
|
|
2235
2170
|
var browser = {
|
|
2236
2171
|
name: "unknown",
|
|
2237
2172
|
version: "-1",
|
|
2238
2173
|
majorVersion: -1,
|
|
2239
|
-
webview:
|
|
2174
|
+
webview: isWebView(nextAgent),
|
|
2240
2175
|
chromium: false,
|
|
2241
2176
|
chromiumVersion: "-1",
|
|
2242
2177
|
webkit: false,
|
|
@@ -2274,7 +2209,7 @@ version: 4.9.1
|
|
|
2274
2209
|
|
|
2275
2210
|
if (browserPreset) {
|
|
2276
2211
|
browser.name = browserPreset.id;
|
|
2277
|
-
browser.version = browserVersion;
|
|
2212
|
+
browser.version = browserVersion; // Early whale bugs
|
|
2278
2213
|
|
|
2279
2214
|
if (browser.webview && os.name === "ios" && browser.name !== "safari") {
|
|
2280
2215
|
browser.webview = false;
|
|
@@ -2289,6 +2224,80 @@ version: 4.9.1
|
|
|
2289
2224
|
isHints: false
|
|
2290
2225
|
};
|
|
2291
2226
|
}
|
|
2227
|
+
|
|
2228
|
+
function getClientHintsAgent(osData) {
|
|
2229
|
+
var userAgentData = navigator.userAgentData;
|
|
2230
|
+
var brands = (userAgentData.uaList || userAgentData.brands).slice();
|
|
2231
|
+
var fullVersionList = osData && osData.fullVersionList;
|
|
2232
|
+
var isMobile = userAgentData.mobile || false;
|
|
2233
|
+
var firstBrand = brands[0];
|
|
2234
|
+
var platform = (osData && osData.platform || userAgentData.platform || navigator.platform).toLowerCase();
|
|
2235
|
+
var browser = {
|
|
2236
|
+
name: firstBrand.brand,
|
|
2237
|
+
version: firstBrand.version,
|
|
2238
|
+
majorVersion: -1,
|
|
2239
|
+
webkit: false,
|
|
2240
|
+
webkitVersion: "-1",
|
|
2241
|
+
chromium: false,
|
|
2242
|
+
chromiumVersion: "-1",
|
|
2243
|
+
webview: !!findPresetBrand(WEBVIEW_PRESETS, brands).brand || isWebView(getUserAgentString())
|
|
2244
|
+
};
|
|
2245
|
+
var os = {
|
|
2246
|
+
name: "unknown",
|
|
2247
|
+
version: "-1",
|
|
2248
|
+
majorVersion: -1
|
|
2249
|
+
};
|
|
2250
|
+
browser.webkit = !browser.chromium && some(WEBKIT_PRESETS, function (preset) {
|
|
2251
|
+
return findBrand(brands, preset);
|
|
2252
|
+
});
|
|
2253
|
+
var chromiumBrand = findPresetBrand(CHROMIUM_PRESETS, brands);
|
|
2254
|
+
browser.chromium = !!chromiumBrand.brand;
|
|
2255
|
+
browser.chromiumVersion = chromiumBrand.version;
|
|
2256
|
+
|
|
2257
|
+
if (!browser.chromium) {
|
|
2258
|
+
var webkitBrand = findPresetBrand(WEBKIT_PRESETS, brands);
|
|
2259
|
+
browser.webkit = !!webkitBrand.brand;
|
|
2260
|
+
browser.webkitVersion = webkitBrand.version;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
var platfomResult = find(OS_PRESETS, function (preset) {
|
|
2264
|
+
return new RegExp("" + preset.test, "g").exec(platform);
|
|
2265
|
+
});
|
|
2266
|
+
os.name = platfomResult ? platfomResult.id : "";
|
|
2267
|
+
|
|
2268
|
+
if (osData) {
|
|
2269
|
+
os.version = osData.platformVersion;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
if (fullVersionList && fullVersionList.length) {
|
|
2273
|
+
var browserBrandByFullVersionList = findPresetBrand(BROWSER_PRESETS, fullVersionList);
|
|
2274
|
+
browser.name = browserBrandByFullVersionList.brand || browser.name;
|
|
2275
|
+
browser.version = browserBrandByFullVersionList.version || browser.version;
|
|
2276
|
+
} else {
|
|
2277
|
+
var browserBrand = findPresetBrand(BROWSER_PRESETS, brands);
|
|
2278
|
+
browser.name = browserBrand.brand || browser.name;
|
|
2279
|
+
browser.version = browserBrand.brand && osData ? osData.uaFullVersion : browserBrand.version;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
if (browser.webkit) {
|
|
2283
|
+
os.name = isMobile ? "ios" : "mac";
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
if (os.name === "ios" && browser.webview) {
|
|
2287
|
+
browser.version = "-1";
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
os.version = convertVersion(os.version);
|
|
2291
|
+
browser.version = convertVersion(browser.version);
|
|
2292
|
+
os.majorVersion = parseInt(os.version, 10);
|
|
2293
|
+
browser.majorVersion = parseInt(browser.version, 10);
|
|
2294
|
+
return {
|
|
2295
|
+
browser: browser,
|
|
2296
|
+
os: os,
|
|
2297
|
+
isMobile: isMobile,
|
|
2298
|
+
isHints: true
|
|
2299
|
+
};
|
|
2300
|
+
}
|
|
2292
2301
|
/**
|
|
2293
2302
|
* Extracts browser and operating system information from the user agent string.
|
|
2294
2303
|
* @ko 유저 에이전트 문자열에서 브라우저와 운영체제 정보를 추출한다.
|
|
@@ -2303,19 +2312,121 @@ version: 4.9.1
|
|
|
2303
2312
|
|
|
2304
2313
|
function agent(userAgent) {
|
|
2305
2314
|
if (typeof userAgent === "undefined" && hasUserAgentData()) {
|
|
2306
|
-
return
|
|
2315
|
+
return getClientHintsAgent();
|
|
2307
2316
|
} else {
|
|
2308
|
-
return
|
|
2317
|
+
return getLegacyAgent(userAgent);
|
|
2309
2318
|
}
|
|
2310
2319
|
}
|
|
2311
2320
|
|
|
2312
2321
|
/*
|
|
2313
|
-
Copyright (c)
|
|
2322
|
+
Copyright (c) NAVER Crop.
|
|
2323
|
+
name: @cfcs/core
|
|
2324
|
+
license: MIT
|
|
2325
|
+
author: NAVER Crop.
|
|
2326
|
+
repository: https://github.com/naver/cfcs
|
|
2327
|
+
version: 0.0.4
|
|
2328
|
+
*/
|
|
2329
|
+
|
|
2330
|
+
/**
|
|
2331
|
+
* cfcs
|
|
2332
|
+
* Copyright (c) 2022-present NAVER Corp.
|
|
2333
|
+
* MIT license
|
|
2334
|
+
*/
|
|
2335
|
+
function keys(obj) {
|
|
2336
|
+
return Object.keys(obj);
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
var OBSERVERS_PATH = "__observers__";
|
|
2340
|
+
|
|
2341
|
+
var Observer =
|
|
2342
|
+
/*#__PURE__*/
|
|
2343
|
+
function () {
|
|
2344
|
+
function Observer(value) {
|
|
2345
|
+
this._emitter = new Component();
|
|
2346
|
+
this._current = value;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
var __proto = Observer.prototype;
|
|
2350
|
+
Object.defineProperty(__proto, "current", {
|
|
2351
|
+
get: function () {
|
|
2352
|
+
return this._current;
|
|
2353
|
+
},
|
|
2354
|
+
set: function (value) {
|
|
2355
|
+
var isUpdate = value !== this._current;
|
|
2356
|
+
this._current = value;
|
|
2357
|
+
|
|
2358
|
+
if (isUpdate) {
|
|
2359
|
+
this._emitter.trigger("update", value);
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2362
|
+
enumerable: false,
|
|
2363
|
+
configurable: true
|
|
2364
|
+
});
|
|
2365
|
+
|
|
2366
|
+
__proto.subscribe = function (callback) {
|
|
2367
|
+
this._emitter.on("update", callback);
|
|
2368
|
+
};
|
|
2369
|
+
|
|
2370
|
+
__proto.unsubscribe = function (callback) {
|
|
2371
|
+
this._emitter.off("update", callback);
|
|
2372
|
+
};
|
|
2373
|
+
|
|
2374
|
+
return Observer;
|
|
2375
|
+
}();
|
|
2376
|
+
function observe(defaultValue) {
|
|
2377
|
+
return new Observer(defaultValue);
|
|
2378
|
+
}
|
|
2379
|
+
function getObservers(instance) {
|
|
2380
|
+
if (!instance[OBSERVERS_PATH]) {
|
|
2381
|
+
instance[OBSERVERS_PATH] = {};
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
return instance[OBSERVERS_PATH];
|
|
2385
|
+
}
|
|
2386
|
+
function getObserver(instance, name, defaultValue) {
|
|
2387
|
+
var observers = getObservers(instance);
|
|
2388
|
+
|
|
2389
|
+
if (!observers[name]) {
|
|
2390
|
+
observers[name] = observe(defaultValue);
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
return observers[name];
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
function injectReactiveSubscribe(object) {
|
|
2397
|
+
object["subscribe"] = function (name, callback) {
|
|
2398
|
+
getObserver(this, name).subscribe(callback);
|
|
2399
|
+
};
|
|
2400
|
+
|
|
2401
|
+
object["unsubscribe"] = function (name, callback) {
|
|
2402
|
+
var _this = this;
|
|
2403
|
+
|
|
2404
|
+
if (!name) {
|
|
2405
|
+
keys(getObservers(this)).forEach(function (observerName) {
|
|
2406
|
+
_this.unsubscribe(observerName);
|
|
2407
|
+
});
|
|
2408
|
+
return;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
if (!(name in this)) {
|
|
2412
|
+
return;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
getObserver(this, name).unsubscribe(callback);
|
|
2416
|
+
};
|
|
2417
|
+
}
|
|
2418
|
+
function ReactiveSubscribe(Constructor) {
|
|
2419
|
+
var prototype = Constructor.prototype;
|
|
2420
|
+
injectReactiveSubscribe(prototype);
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
/*
|
|
2424
|
+
Copyright (c) NAVER Corp.
|
|
2314
2425
|
name: @egjs/axes
|
|
2315
2426
|
license: MIT
|
|
2316
2427
|
author: NAVER Corp.
|
|
2317
2428
|
repository: https://github.com/naver/egjs-axes
|
|
2318
|
-
version: 3.
|
|
2429
|
+
version: 3.6.0
|
|
2319
2430
|
*/
|
|
2320
2431
|
|
|
2321
2432
|
/*! *****************************************************************************
|
|
@@ -2368,6 +2479,18 @@ version: 4.9.1
|
|
|
2368
2479
|
|
|
2369
2480
|
return __assign$1.apply(this, arguments);
|
|
2370
2481
|
};
|
|
2482
|
+
function __decorate(decorators, target, key, desc) {
|
|
2483
|
+
var c = arguments.length,
|
|
2484
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
2485
|
+
d;
|
|
2486
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2487
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/*
|
|
2491
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2492
|
+
* egjs projects are licensed under the MIT license
|
|
2493
|
+
*/
|
|
2371
2494
|
|
|
2372
2495
|
/* eslint-disable no-new-func, no-nested-ternary */
|
|
2373
2496
|
var win;
|
|
@@ -2383,6 +2506,10 @@ version: 4.9.1
|
|
|
2383
2506
|
win = window;
|
|
2384
2507
|
}
|
|
2385
2508
|
|
|
2509
|
+
/*
|
|
2510
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
2511
|
+
* egjs projects are licensed under the MIT license
|
|
2512
|
+
*/
|
|
2386
2513
|
var DIRECTION_NONE = 1;
|
|
2387
2514
|
var DIRECTION_LEFT = 2;
|
|
2388
2515
|
var DIRECTION_RIGHT = 4;
|
|
@@ -2457,6 +2584,8 @@ version: 4.9.1
|
|
|
2457
2584
|
} else if (param === win) {
|
|
2458
2585
|
// window
|
|
2459
2586
|
el = param;
|
|
2587
|
+
} else if ("value" in param || "current" in param) {
|
|
2588
|
+
el = param.value || param.current;
|
|
2460
2589
|
} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) {
|
|
2461
2590
|
// HTMLElement, Document
|
|
2462
2591
|
el = param;
|
|
@@ -2518,7 +2647,7 @@ version: 4.9.1
|
|
|
2518
2647
|
};
|
|
2519
2648
|
/**
|
|
2520
2649
|
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
|
|
2521
|
-
* @param {Number} key −
|
|
2650
|
+
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
|
|
2522
2651
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame
|
|
2523
2652
|
* @private
|
|
2524
2653
|
*/
|
|
@@ -2585,7 +2714,7 @@ version: 4.9.1
|
|
|
2585
2714
|
return 0;
|
|
2586
2715
|
}
|
|
2587
2716
|
|
|
2588
|
-
var v = ""
|
|
2717
|
+
var v = "".concat(val);
|
|
2589
2718
|
|
|
2590
2719
|
if (v.indexOf("e") >= 0) {
|
|
2591
2720
|
// Exponential Format
|
|
@@ -2632,6 +2761,33 @@ version: 4.9.1
|
|
|
2632
2761
|
});
|
|
2633
2762
|
return same;
|
|
2634
2763
|
};
|
|
2764
|
+
var getDirection = function (useHorizontal, useVertical) {
|
|
2765
|
+
if (useHorizontal && useVertical) {
|
|
2766
|
+
return DIRECTION_ALL;
|
|
2767
|
+
} else if (useHorizontal) {
|
|
2768
|
+
return DIRECTION_HORIZONTAL;
|
|
2769
|
+
} else if (useVertical) {
|
|
2770
|
+
return DIRECTION_VERTICAL;
|
|
2771
|
+
} else {
|
|
2772
|
+
return DIRECTION_NONE;
|
|
2773
|
+
}
|
|
2774
|
+
};
|
|
2775
|
+
var getInitialPos = function (axis, startPos) {
|
|
2776
|
+
return __assign$1(__assign$1({}, Object.keys(axis).reduce(function (result, key) {
|
|
2777
|
+
var _a;
|
|
2778
|
+
|
|
2779
|
+
var _b, _c;
|
|
2780
|
+
|
|
2781
|
+
return Object.assign(result, (_a = {}, _a[key] = (_c = (_b = axis[key].startPos) !== null && _b !== void 0 ? _b : axis[key].range[0]) !== null && _c !== void 0 ? _c : 0, _a));
|
|
2782
|
+
}, {})), startPos);
|
|
2783
|
+
};
|
|
2784
|
+
var useDirection = function (checkType, direction, userDirection) {
|
|
2785
|
+
if (userDirection) {
|
|
2786
|
+
return !!(direction === DIRECTION_ALL || direction & checkType && userDirection & checkType);
|
|
2787
|
+
} else {
|
|
2788
|
+
return !!(direction & checkType);
|
|
2789
|
+
}
|
|
2790
|
+
};
|
|
2635
2791
|
var setCssProps = function (element, option, direction) {
|
|
2636
2792
|
var _a;
|
|
2637
2793
|
|
|
@@ -2841,6 +2997,8 @@ version: 4.9.1
|
|
|
2841
2997
|
|
|
2842
2998
|
|
|
2843
2999
|
__proto.triggerChange = function (pos, depaPos, option, holding) {
|
|
3000
|
+
var _this = this;
|
|
3001
|
+
|
|
2844
3002
|
if (holding === void 0) {
|
|
2845
3003
|
holding = false;
|
|
2846
3004
|
}
|
|
@@ -2863,12 +3021,18 @@ version: 4.9.1
|
|
|
2863
3021
|
inputEvent: inputEvent,
|
|
2864
3022
|
isTrusted: !!inputEvent,
|
|
2865
3023
|
input: (option === null || option === void 0 ? void 0 : option.input) || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.input) || null,
|
|
2866
|
-
set: inputEvent ? this._createUserControll(moveTo.pos) : function () {}
|
|
3024
|
+
set: inputEvent ? this._createUserControll(moveTo.pos) : function () {} // eslint-disable-line @typescript-eslint/no-empty-function
|
|
3025
|
+
|
|
2867
3026
|
};
|
|
2868
3027
|
var event = new ComponentEvent$1("change", param);
|
|
2869
3028
|
|
|
2870
3029
|
this._axes.trigger(event);
|
|
2871
3030
|
|
|
3031
|
+
Object.keys(moveTo.pos).forEach(function (axis) {
|
|
3032
|
+
var p = moveTo.pos[axis];
|
|
3033
|
+
getObserver(_this._axes, axis, p).current = p;
|
|
3034
|
+
});
|
|
3035
|
+
|
|
2872
3036
|
if (inputEvent) {
|
|
2873
3037
|
axisManager.set(param.set().destPos);
|
|
2874
3038
|
}
|
|
@@ -3027,7 +3191,7 @@ version: 4.9.1
|
|
|
3027
3191
|
__proto._getRoundPos = function (pos, depaPos) {
|
|
3028
3192
|
// round value if round exist
|
|
3029
3193
|
var roundUnit = this._axes.options.round; // if (round == null) {
|
|
3030
|
-
//
|
|
3194
|
+
// return {pos, depaPos}; // undefined, undefined
|
|
3031
3195
|
// }
|
|
3032
3196
|
|
|
3033
3197
|
return {
|
|
@@ -3079,6 +3243,10 @@ version: 4.9.1
|
|
|
3079
3243
|
return InterruptManager;
|
|
3080
3244
|
}();
|
|
3081
3245
|
|
|
3246
|
+
/*
|
|
3247
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
3248
|
+
* egjs projects are licensed under the MIT license
|
|
3249
|
+
*/
|
|
3082
3250
|
var getInsidePosition = function (destPos, range, circular, bounce) {
|
|
3083
3251
|
var toDestPos = destPos;
|
|
3084
3252
|
var targetRange = [circular[0] ? range[0] : bounce ? range[0] - bounce[0] : range[0], circular[1] ? range[1] : bounce ? range[1] + bounce[1] : range[1]];
|
|
@@ -3229,6 +3397,7 @@ version: 4.9.1
|
|
|
3229
3397
|
Object.keys(this._axis).forEach(function (axis) {
|
|
3230
3398
|
_this._axis[axis] = __assign$1({
|
|
3231
3399
|
range: [0, 100],
|
|
3400
|
+
startPos: _this._axis[axis].range[0],
|
|
3232
3401
|
bounce: [0, 0],
|
|
3233
3402
|
circular: [false, false]
|
|
3234
3403
|
}, _this._axis[axis]);
|
|
@@ -3828,7 +3997,7 @@ version: 4.9.1
|
|
|
3828
3997
|
this._moveDistance = this._axisManager.get(input.axes);
|
|
3829
3998
|
};
|
|
3830
3999
|
|
|
3831
|
-
__proto.change = function (input, event, offset,
|
|
4000
|
+
__proto.change = function (input, event, offset, useAnimation) {
|
|
3832
4001
|
if (this._isStopped || !this._interruptManager.isInterrupting() || this._axisManager.every(offset, function (v) {
|
|
3833
4002
|
return v === 0;
|
|
3834
4003
|
})) {
|
|
@@ -3876,7 +4045,7 @@ version: 4.9.1
|
|
|
3876
4045
|
event: event
|
|
3877
4046
|
};
|
|
3878
4047
|
|
|
3879
|
-
if (
|
|
4048
|
+
if (useAnimation) {
|
|
3880
4049
|
var duration = this._animationManager.getDuration(destPos, depaPos);
|
|
3881
4050
|
|
|
3882
4051
|
this._animationManager.animateTo(destPos, duration, changeOption);
|
|
@@ -4463,6 +4632,7 @@ version: 4.9.1
|
|
|
4463
4632
|
* @param {Number[]} [range] The coordinate of range <ko>좌표 범위</ko>
|
|
4464
4633
|
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4465
4634
|
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4635
|
+
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4466
4636
|
* @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>
|
|
4467
4637
|
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4468
4638
|
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
@@ -4497,50 +4667,50 @@ version: 4.9.1
|
|
|
4497
4667
|
*
|
|
4498
4668
|
* @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>
|
|
4499
4669
|
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4500
|
-
* @param {Object.<string, number>} [startPos=null] The coordinates to be moved when creating an instance.
|
|
4670
|
+
* @param {Object.<string, number>} [startPos=null] The coordinates to be moved when creating an instance. It is applied with higher priority than startPos of axisOption.<ko>인스턴스 생성시 이동할 좌표, axisOption의 startPos보다 높은 우선순위로 적용된다.</ko>
|
|
4501
4671
|
*
|
|
4502
4672
|
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4503
4673
|
* @example
|
|
4504
4674
|
* ```js
|
|
4505
4675
|
* // 1. Initialize eg.Axes
|
|
4506
4676
|
* const axes = new eg.Axes({
|
|
4507
|
-
*
|
|
4508
|
-
*
|
|
4509
|
-
*
|
|
4510
|
-
*
|
|
4511
|
-
*
|
|
4512
|
-
*
|
|
4513
|
-
*
|
|
4514
|
-
*
|
|
4515
|
-
*
|
|
4516
|
-
*
|
|
4517
|
-
*
|
|
4677
|
+
* something1: {
|
|
4678
|
+
* range: [0, 150],
|
|
4679
|
+
* bounce: 50
|
|
4680
|
+
* },
|
|
4681
|
+
* something2: {
|
|
4682
|
+
* range: [0, 200],
|
|
4683
|
+
* bounce: 100
|
|
4684
|
+
* },
|
|
4685
|
+
* somethingN: {
|
|
4686
|
+
* range: [1, 10],
|
|
4687
|
+
* }
|
|
4518
4688
|
* }, {
|
|
4519
4689
|
* deceleration : 0.0024
|
|
4520
4690
|
* });
|
|
4521
4691
|
*
|
|
4522
4692
|
* // 2. attach event handler
|
|
4523
4693
|
* axes.on({
|
|
4524
|
-
*
|
|
4525
|
-
*
|
|
4526
|
-
*
|
|
4527
|
-
*
|
|
4528
|
-
*
|
|
4529
|
-
*
|
|
4530
|
-
*
|
|
4531
|
-
*
|
|
4532
|
-
*
|
|
4533
|
-
*
|
|
4694
|
+
* "hold" : function(evt) {
|
|
4695
|
+
* },
|
|
4696
|
+
* "release" : function(evt) {
|
|
4697
|
+
* },
|
|
4698
|
+
* "animationStart" : function(evt) {
|
|
4699
|
+
* },
|
|
4700
|
+
* "animationEnd" : function(evt) {
|
|
4701
|
+
* },
|
|
4702
|
+
* "change" : function(evt) {
|
|
4703
|
+
* }
|
|
4534
4704
|
* });
|
|
4535
4705
|
*
|
|
4536
4706
|
* // 3. Initialize inputTypes
|
|
4537
4707
|
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4538
|
-
*
|
|
4708
|
+
* scale: [0.5, 1]
|
|
4539
4709
|
* });
|
|
4540
4710
|
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4541
4711
|
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4542
4712
|
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4543
|
-
*
|
|
4713
|
+
* scale: 1.5
|
|
4544
4714
|
* });
|
|
4545
4715
|
*
|
|
4546
4716
|
* // 4. Connect eg.Axes and InputTypes
|
|
@@ -4605,9 +4775,7 @@ version: 4.9.1
|
|
|
4605
4775
|
|
|
4606
4776
|
_this.eventManager.setAnimationManager(_this.animationManager);
|
|
4607
4777
|
|
|
4608
|
-
|
|
4609
|
-
_this.eventManager.triggerChange(startPos);
|
|
4610
|
-
}
|
|
4778
|
+
_this.eventManager.triggerChange(getInitialPos(axis, startPos));
|
|
4611
4779
|
|
|
4612
4780
|
return _this;
|
|
4613
4781
|
}
|
|
@@ -4724,7 +4892,7 @@ version: 4.9.1
|
|
|
4724
4892
|
* "xOther": {
|
|
4725
4893
|
* range: [-100, 100]
|
|
4726
4894
|
* },
|
|
4727
|
-
*
|
|
4895
|
+
* "zoom": {
|
|
4728
4896
|
* range: [50, 30]
|
|
4729
4897
|
* }
|
|
4730
4898
|
* });
|
|
@@ -4753,7 +4921,7 @@ version: 4.9.1
|
|
|
4753
4921
|
* "xOther": {
|
|
4754
4922
|
* range: [-100, 100]
|
|
4755
4923
|
* },
|
|
4756
|
-
*
|
|
4924
|
+
* "zoom": {
|
|
4757
4925
|
* range: [50, 30]
|
|
4758
4926
|
* }
|
|
4759
4927
|
* });
|
|
@@ -4792,7 +4960,7 @@ version: 4.9.1
|
|
|
4792
4960
|
* "xOther": {
|
|
4793
4961
|
* range: [-100, 100]
|
|
4794
4962
|
* },
|
|
4795
|
-
*
|
|
4963
|
+
* "zoom": {
|
|
4796
4964
|
* range: [50, 30]
|
|
4797
4965
|
* }
|
|
4798
4966
|
* });
|
|
@@ -4888,7 +5056,7 @@ version: 4.9.1
|
|
|
4888
5056
|
* "xOther": {
|
|
4889
5057
|
* range: [-100, 100]
|
|
4890
5058
|
* },
|
|
4891
|
-
*
|
|
5059
|
+
* "zoom": {
|
|
4892
5060
|
* range: [50, 30]
|
|
4893
5061
|
* }
|
|
4894
5062
|
* });
|
|
@@ -4927,7 +5095,7 @@ version: 4.9.1
|
|
|
4927
5095
|
*/
|
|
4928
5096
|
|
|
4929
5097
|
|
|
4930
|
-
Axes.VERSION = "3.
|
|
5098
|
+
Axes.VERSION = "3.6.0";
|
|
4931
5099
|
/* eslint-enable */
|
|
4932
5100
|
|
|
4933
5101
|
/**
|
|
@@ -5000,10 +5168,14 @@ version: 4.9.1
|
|
|
5000
5168
|
*/
|
|
5001
5169
|
|
|
5002
5170
|
Axes.DIRECTION_ALL = DIRECTION_ALL;
|
|
5171
|
+
Axes = __decorate([ReactiveSubscribe], Axes);
|
|
5003
5172
|
return Axes;
|
|
5004
5173
|
}(Component);
|
|
5005
5174
|
|
|
5006
|
-
/*
|
|
5175
|
+
/*
|
|
5176
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5177
|
+
* egjs projects are licensed under the MIT license
|
|
5178
|
+
*/
|
|
5007
5179
|
|
|
5008
5180
|
var getDirectionByAngle = function (angle, thresholdAngle) {
|
|
5009
5181
|
if (thresholdAngle < 0 || thresholdAngle > 90) {
|
|
@@ -5013,13 +5185,6 @@ version: 4.9.1
|
|
|
5013
5185
|
var toAngle = Math.abs(angle);
|
|
5014
5186
|
return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
|
|
5015
5187
|
};
|
|
5016
|
-
var useDirection = function (checkType, direction, userDirection) {
|
|
5017
|
-
if (userDirection) {
|
|
5018
|
-
return !!(direction === DIRECTION_ALL || direction & checkType && userDirection & checkType);
|
|
5019
|
-
} else {
|
|
5020
|
-
return !!(direction & checkType);
|
|
5021
|
-
}
|
|
5022
|
-
};
|
|
5023
5188
|
/**
|
|
5024
5189
|
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5025
5190
|
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
@@ -5053,8 +5218,8 @@ version: 4.9.1
|
|
|
5053
5218
|
* @example
|
|
5054
5219
|
* ```js
|
|
5055
5220
|
* const pan = new eg.Axes.PanInput("#area", {
|
|
5056
|
-
*
|
|
5057
|
-
*
|
|
5221
|
+
* inputType: ["touch"],
|
|
5222
|
+
* scale: [1, 1.3],
|
|
5058
5223
|
* });
|
|
5059
5224
|
*
|
|
5060
5225
|
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
@@ -5067,7 +5232,7 @@ version: 4.9.1
|
|
|
5067
5232
|
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5068
5233
|
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5069
5234
|
* ```
|
|
5070
|
-
* @param {HTMLElement|
|
|
5235
|
+
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5071
5236
|
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5072
5237
|
*/
|
|
5073
5238
|
|
|
@@ -5078,8 +5243,6 @@ version: 4.9.1
|
|
|
5078
5243
|
*
|
|
5079
5244
|
*/
|
|
5080
5245
|
function PanInput(el, options) {
|
|
5081
|
-
var _this = this;
|
|
5082
|
-
|
|
5083
5246
|
this.axes = [];
|
|
5084
5247
|
this.element = null;
|
|
5085
5248
|
this._enabled = false;
|
|
@@ -5087,16 +5250,7 @@ version: 4.9.1
|
|
|
5087
5250
|
this._atRightEdge = false;
|
|
5088
5251
|
this._rightEdgeTimer = 0;
|
|
5089
5252
|
|
|
5090
|
-
this.
|
|
5091
|
-
var activeEvent = _this._activeEvent;
|
|
5092
|
-
var prevEvent = activeEvent.prevEvent;
|
|
5093
|
-
|
|
5094
|
-
_this._detachWindowEvent(activeEvent);
|
|
5095
|
-
|
|
5096
|
-
activeEvent.onRelease();
|
|
5097
|
-
|
|
5098
|
-
_this._observer.release(_this, prevEvent, [0, 0]);
|
|
5099
|
-
};
|
|
5253
|
+
this._voidFunction = function () {};
|
|
5100
5254
|
|
|
5101
5255
|
this.element = $(el);
|
|
5102
5256
|
this.options = __assign$1({
|
|
@@ -5117,19 +5271,7 @@ version: 4.9.1
|
|
|
5117
5271
|
var __proto = PanInput.prototype;
|
|
5118
5272
|
|
|
5119
5273
|
__proto.mapAxes = function (axes) {
|
|
5120
|
-
|
|
5121
|
-
var useVertical = !!axes[1];
|
|
5122
|
-
|
|
5123
|
-
if (useHorizontal && useVertical) {
|
|
5124
|
-
this._direction = DIRECTION_ALL;
|
|
5125
|
-
} else if (useHorizontal) {
|
|
5126
|
-
this._direction = DIRECTION_HORIZONTAL;
|
|
5127
|
-
} else if (useVertical) {
|
|
5128
|
-
this._direction = DIRECTION_VERTICAL;
|
|
5129
|
-
} else {
|
|
5130
|
-
this._direction = DIRECTION_NONE;
|
|
5131
|
-
}
|
|
5132
|
-
|
|
5274
|
+
this._direction = getDirection(!!axes[0], !!axes[1]);
|
|
5133
5275
|
this.axes = axes;
|
|
5134
5276
|
};
|
|
5135
5277
|
|
|
@@ -5192,7 +5334,7 @@ version: 4.9.1
|
|
|
5192
5334
|
};
|
|
5193
5335
|
/**
|
|
5194
5336
|
* Returns whether to use an input device
|
|
5195
|
-
* @ko 입력
|
|
5337
|
+
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5196
5338
|
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5197
5339
|
*/
|
|
5198
5340
|
|
|
@@ -5200,6 +5342,24 @@ version: 4.9.1
|
|
|
5200
5342
|
__proto.isEnabled = function () {
|
|
5201
5343
|
return this._enabled;
|
|
5202
5344
|
};
|
|
5345
|
+
/**
|
|
5346
|
+
* Releases current user input.
|
|
5347
|
+
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5348
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5349
|
+
*/
|
|
5350
|
+
|
|
5351
|
+
|
|
5352
|
+
__proto.release = function () {
|
|
5353
|
+
var activeEvent = this._activeEvent;
|
|
5354
|
+
var prevEvent = activeEvent.prevEvent;
|
|
5355
|
+
activeEvent.onRelease();
|
|
5356
|
+
|
|
5357
|
+
this._observer.release(this, prevEvent, [0, 0]);
|
|
5358
|
+
|
|
5359
|
+
this._detachWindowEvent(activeEvent);
|
|
5360
|
+
|
|
5361
|
+
return this;
|
|
5362
|
+
};
|
|
5203
5363
|
|
|
5204
5364
|
__proto._onPanstart = function (event) {
|
|
5205
5365
|
var activeEvent = this._activeEvent;
|
|
@@ -5248,8 +5408,7 @@ version: 4.9.1
|
|
|
5248
5408
|
|
|
5249
5409
|
if (swipeLeftToRight) {
|
|
5250
5410
|
// iOS swipe left => right
|
|
5251
|
-
this.
|
|
5252
|
-
|
|
5411
|
+
this.release();
|
|
5253
5412
|
return;
|
|
5254
5413
|
} else if (this._atRightEdge) {
|
|
5255
5414
|
clearTimeout(this._rightEdgeTimer); // - is right to left
|
|
@@ -5261,13 +5420,13 @@ version: 4.9.1
|
|
|
5261
5420
|
} else {
|
|
5262
5421
|
// iOS swipe right => left
|
|
5263
5422
|
this._rightEdgeTimer = window.setTimeout(function () {
|
|
5264
|
-
return _this.
|
|
5423
|
+
return _this.release();
|
|
5265
5424
|
}, 100);
|
|
5266
5425
|
}
|
|
5267
5426
|
}
|
|
5268
5427
|
}
|
|
5269
5428
|
|
|
5270
|
-
var offset = this.
|
|
5429
|
+
var offset = this._getOffset([panEvent.offsetX, panEvent.offsetY], [useDirection(DIRECTION_HORIZONTAL, this._direction, userDirection), useDirection(DIRECTION_VERTICAL, this._direction, userDirection)]);
|
|
5271
5430
|
|
|
5272
5431
|
var prevent = offset.some(function (v) {
|
|
5273
5432
|
return v !== 0;
|
|
@@ -5303,7 +5462,7 @@ version: 4.9.1
|
|
|
5303
5462
|
clearTimeout(this._rightEdgeTimer);
|
|
5304
5463
|
var prevEvent = activeEvent.prevEvent;
|
|
5305
5464
|
|
|
5306
|
-
var velocity = this.
|
|
5465
|
+
var velocity = this._getOffset([Math.abs(prevEvent.velocityX) * (prevEvent.offsetX < 0 ? -1 : 1), Math.abs(prevEvent.velocityY) * (prevEvent.offsetY < 0 ? -1 : 1)], [useDirection(DIRECTION_HORIZONTAL, this._direction), useDirection(DIRECTION_VERTICAL, this._direction)]);
|
|
5307
5466
|
|
|
5308
5467
|
activeEvent.onRelease();
|
|
5309
5468
|
|
|
@@ -5336,6 +5495,11 @@ version: 4.9.1
|
|
|
5336
5495
|
});
|
|
5337
5496
|
};
|
|
5338
5497
|
|
|
5498
|
+
__proto._getOffset = function (properties, direction) {
|
|
5499
|
+
var scale = this.options.scale;
|
|
5500
|
+
return [direction[0] ? properties[0] * scale[0] : 0, direction[1] ? properties[1] * scale[1] : 0];
|
|
5501
|
+
};
|
|
5502
|
+
|
|
5339
5503
|
__proto._attachElementEvent = function (observer) {
|
|
5340
5504
|
var _this = this;
|
|
5341
5505
|
|
|
@@ -5357,7 +5521,7 @@ version: 4.9.1
|
|
|
5357
5521
|
activeEvent.move.forEach(function (event) {
|
|
5358
5522
|
var _a;
|
|
5359
5523
|
|
|
5360
|
-
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.addEventListener(event,
|
|
5524
|
+
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.addEventListener(event, _this._voidFunction);
|
|
5361
5525
|
});
|
|
5362
5526
|
};
|
|
5363
5527
|
|
|
@@ -5373,30 +5537,20 @@ version: 4.9.1
|
|
|
5373
5537
|
activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) {
|
|
5374
5538
|
var _a;
|
|
5375
5539
|
|
|
5376
|
-
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.removeEventListener(event,
|
|
5540
|
+
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.removeEventListener(event, _this._voidFunction);
|
|
5377
5541
|
});
|
|
5378
5542
|
this._enabled = false;
|
|
5379
5543
|
this._observer = null;
|
|
5380
5544
|
};
|
|
5381
5545
|
|
|
5382
|
-
__proto._applyScale = function (properties, direction) {
|
|
5383
|
-
var offset = [0, 0];
|
|
5384
|
-
var scale = this.options.scale;
|
|
5385
|
-
|
|
5386
|
-
if (direction[0]) {
|
|
5387
|
-
offset[0] = properties[0] * scale[0];
|
|
5388
|
-
}
|
|
5389
|
-
|
|
5390
|
-
if (direction[1]) {
|
|
5391
|
-
offset[1] = properties[1] * scale[1];
|
|
5392
|
-
}
|
|
5393
|
-
|
|
5394
|
-
return offset;
|
|
5395
|
-
};
|
|
5396
|
-
|
|
5397
5546
|
return PanInput;
|
|
5398
5547
|
}();
|
|
5399
5548
|
|
|
5549
|
+
/*
|
|
5550
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5551
|
+
* egjs projects are licensed under the MIT license
|
|
5552
|
+
*/
|
|
5553
|
+
|
|
5400
5554
|
var Axes$1 = Axes;
|
|
5401
5555
|
|
|
5402
5556
|
/**
|
|
@@ -5571,7 +5725,7 @@ version: 4.9.1
|
|
|
5571
5725
|
var moveEvent = new ComponentEvent$1(EVENTS.MOVE, {
|
|
5572
5726
|
isTrusted: axesEvent.isTrusted,
|
|
5573
5727
|
holding: this.holding,
|
|
5574
|
-
direction: getDirection(0, axesEvent.delta[POSITION_KEY]),
|
|
5728
|
+
direction: getDirection$1(0, axesEvent.delta[POSITION_KEY]),
|
|
5575
5729
|
axesEvent: axesEvent
|
|
5576
5730
|
});
|
|
5577
5731
|
flicking.trigger(moveEvent);
|
|
@@ -5659,7 +5813,7 @@ version: 4.9.1
|
|
|
5659
5813
|
var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
|
|
5660
5814
|
isTrusted: axesEvent.isTrusted,
|
|
5661
5815
|
holding: this.holding,
|
|
5662
|
-
direction: getDirection(animatingContext.start, animatingContext.end),
|
|
5816
|
+
direction: getDirection$1(animatingContext.start, animatingContext.end),
|
|
5663
5817
|
axesEvent: axesEvent
|
|
5664
5818
|
});
|
|
5665
5819
|
flicking.trigger(moveStartEvent);
|
|
@@ -5720,7 +5874,7 @@ version: 4.9.1
|
|
|
5720
5874
|
var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
|
|
5721
5875
|
isTrusted: axesEvent.isTrusted,
|
|
5722
5876
|
holding: this.holding,
|
|
5723
|
-
direction: getDirection(0, -offset),
|
|
5877
|
+
direction: getDirection$1(0, -offset),
|
|
5724
5878
|
axesEvent: axesEvent
|
|
5725
5879
|
});
|
|
5726
5880
|
flicking.trigger(moveStartEvent);
|
|
@@ -5822,7 +5976,7 @@ version: 4.9.1
|
|
|
5822
5976
|
index: clickedPanel.index,
|
|
5823
5977
|
panel: clickedPanel,
|
|
5824
5978
|
// Direction to the clicked panel
|
|
5825
|
-
direction: getDirection(cameraPosition, clickedPanelPosition)
|
|
5979
|
+
direction: getDirection$1(cameraPosition, clickedPanelPosition)
|
|
5826
5980
|
}));
|
|
5827
5981
|
}
|
|
5828
5982
|
};
|
|
@@ -5977,7 +6131,7 @@ version: 4.9.1
|
|
|
5977
6131
|
transitTo(STATE_TYPE.IDLE);
|
|
5978
6132
|
flicking.trigger(new ComponentEvent$1(EVENTS.MOVE_END, {
|
|
5979
6133
|
isTrusted: axesEvent.isTrusted,
|
|
5980
|
-
direction: getDirection(animatingContext.start, animatingContext.end),
|
|
6134
|
+
direction: getDirection$1(animatingContext.start, animatingContext.end),
|
|
5981
6135
|
axesEvent: axesEvent
|
|
5982
6136
|
}));
|
|
5983
6137
|
var targetPanel = this._targetPanel;
|
|
@@ -6419,6 +6573,20 @@ version: 4.9.1
|
|
|
6419
6573
|
(_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable();
|
|
6420
6574
|
return this;
|
|
6421
6575
|
};
|
|
6576
|
+
/**
|
|
6577
|
+
* Releases ongoing user input (mouse/touch)
|
|
6578
|
+
* @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다
|
|
6579
|
+
* @chainable
|
|
6580
|
+
* @return {this}
|
|
6581
|
+
*/
|
|
6582
|
+
|
|
6583
|
+
|
|
6584
|
+
__proto.release = function () {
|
|
6585
|
+
var _a;
|
|
6586
|
+
|
|
6587
|
+
(_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release();
|
|
6588
|
+
return this;
|
|
6589
|
+
};
|
|
6422
6590
|
/**
|
|
6423
6591
|
* Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state
|
|
6424
6592
|
* @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다
|
|
@@ -6730,6 +6898,19 @@ version: 4.9.1
|
|
|
6730
6898
|
|
|
6731
6899
|
return this;
|
|
6732
6900
|
};
|
|
6901
|
+
/**
|
|
6902
|
+
* Releases ongoing user input (mouse/touch)
|
|
6903
|
+
* @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다
|
|
6904
|
+
* @chainable
|
|
6905
|
+
* @return {this}
|
|
6906
|
+
*/
|
|
6907
|
+
|
|
6908
|
+
|
|
6909
|
+
__proto.release = function () {
|
|
6910
|
+
this._controller.release();
|
|
6911
|
+
|
|
6912
|
+
return this;
|
|
6913
|
+
};
|
|
6733
6914
|
/**
|
|
6734
6915
|
* Update position after resizing
|
|
6735
6916
|
* @ko resize 이후에 position을 업데이트합니다
|
|
@@ -6890,7 +7071,7 @@ version: 4.9.1
|
|
|
6890
7071
|
prevIndex: (_a = prevActivePanel === null || prevActivePanel === void 0 ? void 0 : prevActivePanel.index) !== null && _a !== void 0 ? _a : -1,
|
|
6891
7072
|
prevPanel: prevActivePanel,
|
|
6892
7073
|
isTrusted: isTrusted,
|
|
6893
|
-
direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE
|
|
7074
|
+
direction: prevActivePanel ? getDirection$1(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE
|
|
6894
7075
|
}));
|
|
6895
7076
|
} else {
|
|
6896
7077
|
flicking.trigger(new ComponentEvent$1(EVENTS.RESTORED, {
|
|
@@ -6910,7 +7091,7 @@ version: 4.9.1
|
|
|
6910
7091
|
index: panel.index,
|
|
6911
7092
|
panel: panel,
|
|
6912
7093
|
isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false,
|
|
6913
|
-
direction: getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
7094
|
+
direction: getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
6914
7095
|
});
|
|
6915
7096
|
flicking.trigger(event);
|
|
6916
7097
|
|
|
@@ -8986,7 +9167,7 @@ version: 4.9.1
|
|
|
8986
9167
|
license: MIT
|
|
8987
9168
|
author: NAVER Corp.
|
|
8988
9169
|
repository: https://github.com/naver/egjs-imready
|
|
8989
|
-
version: 1.
|
|
9170
|
+
version: 1.3.0
|
|
8990
9171
|
*/
|
|
8991
9172
|
|
|
8992
9173
|
/*! *****************************************************************************
|
|
@@ -9073,8 +9254,12 @@ version: 4.9.1
|
|
|
9073
9254
|
|
|
9074
9255
|
return !!target.getAttribute(prefix + "width");
|
|
9075
9256
|
}
|
|
9076
|
-
function hasLoadingAttribute(target) {
|
|
9077
|
-
|
|
9257
|
+
function hasLoadingAttribute(target, prefix) {
|
|
9258
|
+
if (prefix === void 0) {
|
|
9259
|
+
prefix = "data-";
|
|
9260
|
+
}
|
|
9261
|
+
|
|
9262
|
+
return "loading" in target && target.getAttribute("loading") === "lazy" || !!target.getAttribute(prefix + "lazy");
|
|
9078
9263
|
}
|
|
9079
9264
|
function hasSkipAttribute(target, prefix) {
|
|
9080
9265
|
if (prefix === void 0) {
|
|
@@ -9199,6 +9384,11 @@ version: 4.9.1
|
|
|
9199
9384
|
|
|
9200
9385
|
if (e && e.type === "error") {
|
|
9201
9386
|
_this.onError(_this.element);
|
|
9387
|
+
}
|
|
9388
|
+
|
|
9389
|
+
if (_this.hasLoading && _this.checkElement()) {
|
|
9390
|
+
// I'm not ready
|
|
9391
|
+
return;
|
|
9202
9392
|
} // I'm pre-ready and ready!
|
|
9203
9393
|
|
|
9204
9394
|
|
|
@@ -9214,7 +9404,7 @@ version: 4.9.1
|
|
|
9214
9404
|
var prefix = _this.options.prefix;
|
|
9215
9405
|
_this.hasDataSize = hasSizeAttribute(element, prefix);
|
|
9216
9406
|
_this.isSkip = hasSkipAttribute(element, prefix);
|
|
9217
|
-
_this.hasLoading = hasLoadingAttribute(element);
|
|
9407
|
+
_this.hasLoading = hasLoadingAttribute(element, prefix);
|
|
9218
9408
|
return _this;
|
|
9219
9409
|
}
|
|
9220
9410
|
|
|
@@ -9600,6 +9790,7 @@ version: 4.9.1
|
|
|
9600
9790
|
|
|
9601
9791
|
var tagName = element.tagName.toLowerCase();
|
|
9602
9792
|
var loaders = this.options.loaders;
|
|
9793
|
+
var prefix = options.prefix;
|
|
9603
9794
|
var tags = Object.keys(loaders);
|
|
9604
9795
|
|
|
9605
9796
|
if (loaders[tagName]) {
|
|
@@ -9609,7 +9800,7 @@ version: 4.9.1
|
|
|
9609
9800
|
var loader = new ElementLoader(element, options);
|
|
9610
9801
|
var children = toArray(element.querySelectorAll(tags.join(", ")));
|
|
9611
9802
|
loader.setHasLoading(children.some(function (el) {
|
|
9612
|
-
return hasLoadingAttribute(el);
|
|
9803
|
+
return hasLoadingAttribute(el, prefix);
|
|
9613
9804
|
}));
|
|
9614
9805
|
var withPreReady = false;
|
|
9615
9806
|
var childrenImReady = this.clone().on("error", function (e) {
|
|
@@ -9694,13 +9885,13 @@ version: 4.9.1
|
|
|
9694
9885
|
* ```
|
|
9695
9886
|
*/
|
|
9696
9887
|
|
|
9697
|
-
this.trigger("error", {
|
|
9888
|
+
this.trigger(new ComponentEvent$1("error", {
|
|
9698
9889
|
element: info.element,
|
|
9699
9890
|
index: index,
|
|
9700
9891
|
target: target,
|
|
9701
9892
|
errorCount: this.getErrorCount(),
|
|
9702
9893
|
totalErrorCount: ++this.totalErrorCount
|
|
9703
|
-
});
|
|
9894
|
+
}));
|
|
9704
9895
|
};
|
|
9705
9896
|
|
|
9706
9897
|
__proto.onPreReadyElement = function (index) {
|
|
@@ -9734,7 +9925,7 @@ version: 4.9.1
|
|
|
9734
9925
|
* ```
|
|
9735
9926
|
*/
|
|
9736
9927
|
|
|
9737
|
-
this.trigger("preReadyElement", {
|
|
9928
|
+
this.trigger(new ComponentEvent$1("preReadyElement", {
|
|
9738
9929
|
element: info.element,
|
|
9739
9930
|
index: index,
|
|
9740
9931
|
preReadyCount: this.preReadyCount,
|
|
@@ -9744,7 +9935,7 @@ version: 4.9.1
|
|
|
9744
9935
|
isReady: this.isReady(),
|
|
9745
9936
|
hasLoading: info.hasLoading,
|
|
9746
9937
|
isSkip: info.isSkip
|
|
9747
|
-
});
|
|
9938
|
+
}));
|
|
9748
9939
|
};
|
|
9749
9940
|
|
|
9750
9941
|
__proto.onPreReady = function () {
|
|
@@ -9776,12 +9967,12 @@ version: 4.9.1
|
|
|
9776
9967
|
* ```
|
|
9777
9968
|
*/
|
|
9778
9969
|
|
|
9779
|
-
this.trigger("preReady", {
|
|
9970
|
+
this.trigger(new ComponentEvent$1("preReady", {
|
|
9780
9971
|
readyCount: this.readyCount,
|
|
9781
9972
|
totalCount: this.totalCount,
|
|
9782
9973
|
isReady: this.isReady(),
|
|
9783
9974
|
hasLoading: this.hasLoading()
|
|
9784
|
-
});
|
|
9975
|
+
}));
|
|
9785
9976
|
};
|
|
9786
9977
|
|
|
9787
9978
|
__proto.onReadyElement = function (index) {
|
|
@@ -9815,7 +10006,7 @@ version: 4.9.1
|
|
|
9815
10006
|
* ```
|
|
9816
10007
|
*/
|
|
9817
10008
|
|
|
9818
|
-
this.trigger("readyElement", {
|
|
10009
|
+
this.trigger(new ComponentEvent$1("readyElement", {
|
|
9819
10010
|
index: index,
|
|
9820
10011
|
element: info.element,
|
|
9821
10012
|
hasError: info.hasError,
|
|
@@ -9829,7 +10020,7 @@ version: 4.9.1
|
|
|
9829
10020
|
hasLoading: info.hasLoading,
|
|
9830
10021
|
isPreReadyOver: this.isPreReadyOver,
|
|
9831
10022
|
isSkip: info.isSkip
|
|
9832
|
-
});
|
|
10023
|
+
}));
|
|
9833
10024
|
};
|
|
9834
10025
|
|
|
9835
10026
|
__proto.onReady = function () {
|
|
@@ -9863,11 +10054,11 @@ version: 4.9.1
|
|
|
9863
10054
|
* });
|
|
9864
10055
|
* ```
|
|
9865
10056
|
*/
|
|
9866
|
-
this.trigger("ready", {
|
|
10057
|
+
this.trigger(new ComponentEvent$1("ready", {
|
|
9867
10058
|
errorCount: this.getErrorCount(),
|
|
9868
10059
|
totalErrorCount: this.totalErrorCount,
|
|
9869
10060
|
totalCount: this.totalCount
|
|
9870
|
-
});
|
|
10061
|
+
}));
|
|
9871
10062
|
};
|
|
9872
10063
|
|
|
9873
10064
|
__proto.getErrorCount = function () {
|
|
@@ -13024,6 +13215,10 @@ version: 4.9.1
|
|
|
13024
13215
|
return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING));
|
|
13025
13216
|
}
|
|
13026
13217
|
|
|
13218
|
+
if (this._control.holding) {
|
|
13219
|
+
this._control.controller.release();
|
|
13220
|
+
}
|
|
13221
|
+
|
|
13027
13222
|
return this._control.moveToPanel(panel, {
|
|
13028
13223
|
duration: duration,
|
|
13029
13224
|
direction: direction
|
|
@@ -13572,7 +13767,7 @@ version: 4.9.1
|
|
|
13572
13767
|
*/
|
|
13573
13768
|
|
|
13574
13769
|
|
|
13575
|
-
Flicking.VERSION = "4.9.
|
|
13770
|
+
Flicking.VERSION = "4.9.2";
|
|
13576
13771
|
return Flicking;
|
|
13577
13772
|
}(Component);
|
|
13578
13773
|
|