@egjs/flicking 4.9.1 → 4.9.3
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 +541 -232
- 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.3
|
|
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.8.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,24 @@ 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 useDirection = function (checkType, direction, userDirection) {
|
|
2776
|
+
if (userDirection) {
|
|
2777
|
+
return !!(direction === DIRECTION_ALL || direction & checkType && userDirection & checkType);
|
|
2778
|
+
} else {
|
|
2779
|
+
return !!(direction & checkType);
|
|
2780
|
+
}
|
|
2781
|
+
};
|
|
2635
2782
|
var setCssProps = function (element, option, direction) {
|
|
2636
2783
|
var _a;
|
|
2637
2784
|
|
|
@@ -2841,6 +2988,8 @@ version: 4.9.1
|
|
|
2841
2988
|
|
|
2842
2989
|
|
|
2843
2990
|
__proto.triggerChange = function (pos, depaPos, option, holding) {
|
|
2991
|
+
var _this = this;
|
|
2992
|
+
|
|
2844
2993
|
if (holding === void 0) {
|
|
2845
2994
|
holding = false;
|
|
2846
2995
|
}
|
|
@@ -2863,12 +3012,18 @@ version: 4.9.1
|
|
|
2863
3012
|
inputEvent: inputEvent,
|
|
2864
3013
|
isTrusted: !!inputEvent,
|
|
2865
3014
|
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 () {}
|
|
3015
|
+
set: inputEvent ? this._createUserControll(moveTo.pos) : function () {} // eslint-disable-line @typescript-eslint/no-empty-function
|
|
3016
|
+
|
|
2867
3017
|
};
|
|
2868
3018
|
var event = new ComponentEvent$1("change", param);
|
|
2869
3019
|
|
|
2870
3020
|
this._axes.trigger(event);
|
|
2871
3021
|
|
|
3022
|
+
Object.keys(moveTo.pos).forEach(function (axis) {
|
|
3023
|
+
var p = moveTo.pos[axis];
|
|
3024
|
+
getObserver(_this._axes, axis, p).current = p;
|
|
3025
|
+
});
|
|
3026
|
+
|
|
2872
3027
|
if (inputEvent) {
|
|
2873
3028
|
axisManager.set(param.set().destPos);
|
|
2874
3029
|
}
|
|
@@ -3027,7 +3182,7 @@ version: 4.9.1
|
|
|
3027
3182
|
__proto._getRoundPos = function (pos, depaPos) {
|
|
3028
3183
|
// round value if round exist
|
|
3029
3184
|
var roundUnit = this._axes.options.round; // if (round == null) {
|
|
3030
|
-
//
|
|
3185
|
+
// return {pos, depaPos}; // undefined, undefined
|
|
3031
3186
|
// }
|
|
3032
3187
|
|
|
3033
3188
|
return {
|
|
@@ -3079,6 +3234,10 @@ version: 4.9.1
|
|
|
3079
3234
|
return InterruptManager;
|
|
3080
3235
|
}();
|
|
3081
3236
|
|
|
3237
|
+
/*
|
|
3238
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
3239
|
+
* egjs projects are licensed under the MIT license
|
|
3240
|
+
*/
|
|
3082
3241
|
var getInsidePosition = function (destPos, range, circular, bounce) {
|
|
3083
3242
|
var toDestPos = destPos;
|
|
3084
3243
|
var targetRange = [circular[0] ? range[0] : bounce ? range[0] - bounce[0] : range[0], circular[1] ? range[1] : bounce ? range[1] + bounce[1] : range[1]];
|
|
@@ -3131,9 +3290,9 @@ version: 4.9.1
|
|
|
3131
3290
|
|
|
3132
3291
|
this._complementOptions();
|
|
3133
3292
|
|
|
3134
|
-
this._pos = Object.keys(this._axis).reduce(function (
|
|
3135
|
-
|
|
3136
|
-
return
|
|
3293
|
+
this._pos = Object.keys(this._axis).reduce(function (pos, v) {
|
|
3294
|
+
pos[v] = _this._axis[v].startPos;
|
|
3295
|
+
return pos;
|
|
3137
3296
|
}, {});
|
|
3138
3297
|
}
|
|
3139
3298
|
|
|
@@ -3217,6 +3376,20 @@ version: 4.9.1
|
|
|
3217
3376
|
__proto.getAxisOptions = function (key) {
|
|
3218
3377
|
return this._axis[key];
|
|
3219
3378
|
};
|
|
3379
|
+
|
|
3380
|
+
__proto.setAxis = function (axis) {
|
|
3381
|
+
var _this = this;
|
|
3382
|
+
|
|
3383
|
+
Object.keys(axis).forEach(function (key) {
|
|
3384
|
+
if (!_this._axis[key]) {
|
|
3385
|
+
throw new Error("Axis ".concat(key, " does not exist in Axes instance"));
|
|
3386
|
+
}
|
|
3387
|
+
|
|
3388
|
+
_this._axis[key] = __assign$1(__assign$1({}, _this._axis[key]), axis[key]);
|
|
3389
|
+
});
|
|
3390
|
+
|
|
3391
|
+
this._complementOptions();
|
|
3392
|
+
};
|
|
3220
3393
|
/**
|
|
3221
3394
|
* set up 'css' expression
|
|
3222
3395
|
* @private
|
|
@@ -3229,6 +3402,7 @@ version: 4.9.1
|
|
|
3229
3402
|
Object.keys(this._axis).forEach(function (axis) {
|
|
3230
3403
|
_this._axis[axis] = __assign$1({
|
|
3231
3404
|
range: [0, 100],
|
|
3405
|
+
startPos: _this._axis[axis].range[0],
|
|
3232
3406
|
bounce: [0, 0],
|
|
3233
3407
|
circular: [false, false]
|
|
3234
3408
|
}, _this._axis[axis]);
|
|
@@ -3395,7 +3569,16 @@ version: 4.9.1
|
|
|
3395
3569
|
return;
|
|
3396
3570
|
};
|
|
3397
3571
|
|
|
3398
|
-
__proto.getTouches = function () {
|
|
3572
|
+
__proto.getTouches = function (event, inputButton) {
|
|
3573
|
+
if (inputButton) {
|
|
3574
|
+
var buttonCodeMap = {
|
|
3575
|
+
1: MOUSE_LEFT,
|
|
3576
|
+
2: MOUSE_MIDDLE,
|
|
3577
|
+
3: MOUSE_RIGHT
|
|
3578
|
+
};
|
|
3579
|
+
return this._isValidButton(buttonCodeMap[event.which], inputButton) && this.end.indexOf(event.type) === -1 ? 1 : 0;
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3399
3582
|
return 0;
|
|
3400
3583
|
};
|
|
3401
3584
|
|
|
@@ -3828,7 +4011,7 @@ version: 4.9.1
|
|
|
3828
4011
|
this._moveDistance = this._axisManager.get(input.axes);
|
|
3829
4012
|
};
|
|
3830
4013
|
|
|
3831
|
-
__proto.change = function (input, event, offset,
|
|
4014
|
+
__proto.change = function (input, event, offset, useAnimation) {
|
|
3832
4015
|
if (this._isStopped || !this._interruptManager.isInterrupting() || this._axisManager.every(offset, function (v) {
|
|
3833
4016
|
return v === 0;
|
|
3834
4017
|
})) {
|
|
@@ -3876,7 +4059,7 @@ version: 4.9.1
|
|
|
3876
4059
|
event: event
|
|
3877
4060
|
};
|
|
3878
4061
|
|
|
3879
|
-
if (
|
|
4062
|
+
if (useAnimation) {
|
|
3880
4063
|
var duration = this._animationManager.getDuration(destPos, depaPos);
|
|
3881
4064
|
|
|
3882
4065
|
this._animationManager.animateTo(destPos, duration, changeOption);
|
|
@@ -4460,9 +4643,10 @@ version: 4.9.1
|
|
|
4460
4643
|
/**
|
|
4461
4644
|
* @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system.
|
|
4462
4645
|
* @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다.
|
|
4463
|
-
* @param {Number[]} [range] The
|
|
4646
|
+
* @param {Number[]} [range] The range of coordinate <ko>좌표 범위</ko>
|
|
4464
4647
|
* @param {Number} [range[0]=0] The coordinate of the minimum <ko>최소 좌표</ko>
|
|
4465
4648
|
* @param {Number} [range[1]=0] The coordinate of the maximum <ko>최대 좌표</ko>
|
|
4649
|
+
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko>
|
|
4466
4650
|
* @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
4651
|
* @param {Number} [bounce[0]=0] The size of coordinate of the minimum area <ko>최소 좌표 바운스 영역의 크기</ko>
|
|
4468
4652
|
* @param {Number} [bounce[1]=0] The size of coordinate of the maximum area <ko>최대 좌표 바운스 영역의 크기</ko>
|
|
@@ -4497,50 +4681,50 @@ version: 4.9.1
|
|
|
4497
4681
|
*
|
|
4498
4682
|
* @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
4683
|
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
|
|
4500
|
-
* @param {Object.<string, number>} [startPos=
|
|
4684
|
+
* @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>
|
|
4501
4685
|
*
|
|
4502
4686
|
* @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}
|
|
4503
4687
|
* @example
|
|
4504
4688
|
* ```js
|
|
4505
4689
|
* // 1. Initialize eg.Axes
|
|
4506
4690
|
* const axes = new eg.Axes({
|
|
4507
|
-
*
|
|
4508
|
-
*
|
|
4509
|
-
*
|
|
4510
|
-
*
|
|
4511
|
-
*
|
|
4512
|
-
*
|
|
4513
|
-
*
|
|
4514
|
-
*
|
|
4515
|
-
*
|
|
4516
|
-
*
|
|
4517
|
-
*
|
|
4691
|
+
* something1: {
|
|
4692
|
+
* range: [0, 150],
|
|
4693
|
+
* bounce: 50
|
|
4694
|
+
* },
|
|
4695
|
+
* something2: {
|
|
4696
|
+
* range: [0, 200],
|
|
4697
|
+
* bounce: 100
|
|
4698
|
+
* },
|
|
4699
|
+
* somethingN: {
|
|
4700
|
+
* range: [1, 10],
|
|
4701
|
+
* }
|
|
4518
4702
|
* }, {
|
|
4519
4703
|
* deceleration : 0.0024
|
|
4520
4704
|
* });
|
|
4521
4705
|
*
|
|
4522
4706
|
* // 2. attach event handler
|
|
4523
4707
|
* axes.on({
|
|
4524
|
-
*
|
|
4525
|
-
*
|
|
4526
|
-
*
|
|
4527
|
-
*
|
|
4528
|
-
*
|
|
4529
|
-
*
|
|
4530
|
-
*
|
|
4531
|
-
*
|
|
4532
|
-
*
|
|
4533
|
-
*
|
|
4708
|
+
* "hold" : function(evt) {
|
|
4709
|
+
* },
|
|
4710
|
+
* "release" : function(evt) {
|
|
4711
|
+
* },
|
|
4712
|
+
* "animationStart" : function(evt) {
|
|
4713
|
+
* },
|
|
4714
|
+
* "animationEnd" : function(evt) {
|
|
4715
|
+
* },
|
|
4716
|
+
* "change" : function(evt) {
|
|
4717
|
+
* }
|
|
4534
4718
|
* });
|
|
4535
4719
|
*
|
|
4536
4720
|
* // 3. Initialize inputTypes
|
|
4537
4721
|
* const panInputArea = new eg.Axes.PanInput("#area", {
|
|
4538
|
-
*
|
|
4722
|
+
* scale: [0.5, 1]
|
|
4539
4723
|
* });
|
|
4540
4724
|
* const panInputHmove = new eg.Axes.PanInput("#hmove");
|
|
4541
4725
|
* const panInputVmove = new eg.Axes.PanInput("#vmove");
|
|
4542
4726
|
* const pinchInputArea = new eg.Axes.PinchInput("#area", {
|
|
4543
|
-
*
|
|
4727
|
+
* scale: 1.5
|
|
4544
4728
|
* });
|
|
4545
4729
|
*
|
|
4546
4730
|
* // 4. Connect eg.Axes and InputTypes
|
|
@@ -4579,7 +4763,7 @@ version: 4.9.1
|
|
|
4579
4763
|
}
|
|
4580
4764
|
|
|
4581
4765
|
if (startPos === void 0) {
|
|
4582
|
-
startPos =
|
|
4766
|
+
startPos = {};
|
|
4583
4767
|
}
|
|
4584
4768
|
|
|
4585
4769
|
var _this = _super.call(this) || this;
|
|
@@ -4597,6 +4781,9 @@ version: 4.9.1
|
|
|
4597
4781
|
round: null,
|
|
4598
4782
|
nested: false
|
|
4599
4783
|
}, options);
|
|
4784
|
+
Object.keys(startPos).forEach(function (key) {
|
|
4785
|
+
_this.axis[key].startPos = startPos[key];
|
|
4786
|
+
});
|
|
4600
4787
|
_this.interruptManager = new InterruptManager(_this.options);
|
|
4601
4788
|
_this.axisManager = new AxisManager(_this.axis);
|
|
4602
4789
|
_this.eventManager = new EventManager(_this);
|
|
@@ -4605,9 +4792,7 @@ version: 4.9.1
|
|
|
4605
4792
|
|
|
4606
4793
|
_this.eventManager.setAnimationManager(_this.animationManager);
|
|
4607
4794
|
|
|
4608
|
-
|
|
4609
|
-
_this.eventManager.triggerChange(startPos);
|
|
4610
|
-
}
|
|
4795
|
+
_this.eventManager.triggerChange(_this.axisManager.get());
|
|
4611
4796
|
|
|
4612
4797
|
return _this;
|
|
4613
4798
|
}
|
|
@@ -4724,7 +4909,7 @@ version: 4.9.1
|
|
|
4724
4909
|
* "xOther": {
|
|
4725
4910
|
* range: [-100, 100]
|
|
4726
4911
|
* },
|
|
4727
|
-
*
|
|
4912
|
+
* "zoom": {
|
|
4728
4913
|
* range: [50, 30]
|
|
4729
4914
|
* }
|
|
4730
4915
|
* });
|
|
@@ -4753,7 +4938,7 @@ version: 4.9.1
|
|
|
4753
4938
|
* "xOther": {
|
|
4754
4939
|
* range: [-100, 100]
|
|
4755
4940
|
* },
|
|
4756
|
-
*
|
|
4941
|
+
* "zoom": {
|
|
4757
4942
|
* range: [50, 30]
|
|
4758
4943
|
* }
|
|
4759
4944
|
* });
|
|
@@ -4792,7 +4977,7 @@ version: 4.9.1
|
|
|
4792
4977
|
* "xOther": {
|
|
4793
4978
|
* range: [-100, 100]
|
|
4794
4979
|
* },
|
|
4795
|
-
*
|
|
4980
|
+
* "zoom": {
|
|
4796
4981
|
* range: [50, 30]
|
|
4797
4982
|
* }
|
|
4798
4983
|
* });
|
|
@@ -4816,6 +5001,70 @@ version: 4.9.1
|
|
|
4816
5001
|
this.animationManager.setBy(pos, duration);
|
|
4817
5002
|
return this;
|
|
4818
5003
|
};
|
|
5004
|
+
/**
|
|
5005
|
+
* Change the options of Axes instance.
|
|
5006
|
+
* @ko 인스턴스의 옵션을 변경한다.
|
|
5007
|
+
* @param {AxesOption} options Axes options to change <ko>변경할 옵션 목록</ko>
|
|
5008
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5009
|
+
* @example
|
|
5010
|
+
* ```js
|
|
5011
|
+
* const axes = new eg.Axes({
|
|
5012
|
+
* "x": {
|
|
5013
|
+
* range: [0, 100]
|
|
5014
|
+
* },
|
|
5015
|
+
* }, {
|
|
5016
|
+
* round: 10,
|
|
5017
|
+
* });
|
|
5018
|
+
*
|
|
5019
|
+
* axes.setTo({"x": 48});
|
|
5020
|
+
* axes.get(); // {"x": 50}
|
|
5021
|
+
*
|
|
5022
|
+
* axes.setOptions({
|
|
5023
|
+
* round: 1,
|
|
5024
|
+
* });
|
|
5025
|
+
*
|
|
5026
|
+
* axes.setTo({"x": 48});
|
|
5027
|
+
* axes.get(); // {"x": 48}
|
|
5028
|
+
* ```
|
|
5029
|
+
*/
|
|
5030
|
+
|
|
5031
|
+
|
|
5032
|
+
__proto.setOptions = function (options) {
|
|
5033
|
+
this.options = __assign$1(__assign$1({}, this.options), options);
|
|
5034
|
+
return this;
|
|
5035
|
+
};
|
|
5036
|
+
/**
|
|
5037
|
+
* Change the information of an existing axis.
|
|
5038
|
+
* @ko 존재하는 축의 정보를 변경한다.
|
|
5039
|
+
* @param {Object.<string, AxisOption>} axis Axis options to change <ko>변경할 축의 정보</ko>
|
|
5040
|
+
* @return {eg.Axes} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5041
|
+
* @example
|
|
5042
|
+
* ```js
|
|
5043
|
+
* const axes = new eg.Axes({
|
|
5044
|
+
* "x": {
|
|
5045
|
+
* range: [0, 100]
|
|
5046
|
+
* },
|
|
5047
|
+
* });
|
|
5048
|
+
*
|
|
5049
|
+
* axes.setTo({"x": 150});
|
|
5050
|
+
* axes.get(); // {"x": 100}
|
|
5051
|
+
*
|
|
5052
|
+
* axes.setAxis({
|
|
5053
|
+
* "x": {
|
|
5054
|
+
* range: [0, 200]
|
|
5055
|
+
* },
|
|
5056
|
+
* });
|
|
5057
|
+
*
|
|
5058
|
+
* axes.setTo({"x": 150});
|
|
5059
|
+
* axes.get(); // {"x": 150}
|
|
5060
|
+
* ```
|
|
5061
|
+
*/
|
|
5062
|
+
|
|
5063
|
+
|
|
5064
|
+
__proto.setAxis = function (axis) {
|
|
5065
|
+
this.axisManager.setAxis(axis);
|
|
5066
|
+
return this;
|
|
5067
|
+
};
|
|
4819
5068
|
/**
|
|
4820
5069
|
* Stop an animation in progress.
|
|
4821
5070
|
* @ko 재생 중인 애니메이션을 정지한다.
|
|
@@ -4888,7 +5137,7 @@ version: 4.9.1
|
|
|
4888
5137
|
* "xOther": {
|
|
4889
5138
|
* range: [-100, 100]
|
|
4890
5139
|
* },
|
|
4891
|
-
*
|
|
5140
|
+
* "zoom": {
|
|
4892
5141
|
* range: [50, 30]
|
|
4893
5142
|
* }
|
|
4894
5143
|
* });
|
|
@@ -4927,7 +5176,7 @@ version: 4.9.1
|
|
|
4927
5176
|
*/
|
|
4928
5177
|
|
|
4929
5178
|
|
|
4930
|
-
Axes.VERSION = "3.
|
|
5179
|
+
Axes.VERSION = "3.8.0";
|
|
4931
5180
|
/* eslint-enable */
|
|
4932
5181
|
|
|
4933
5182
|
/**
|
|
@@ -5000,10 +5249,14 @@ version: 4.9.1
|
|
|
5000
5249
|
*/
|
|
5001
5250
|
|
|
5002
5251
|
Axes.DIRECTION_ALL = DIRECTION_ALL;
|
|
5252
|
+
Axes = __decorate([ReactiveSubscribe], Axes);
|
|
5003
5253
|
return Axes;
|
|
5004
5254
|
}(Component);
|
|
5005
5255
|
|
|
5006
|
-
/*
|
|
5256
|
+
/*
|
|
5257
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5258
|
+
* egjs projects are licensed under the MIT license
|
|
5259
|
+
*/
|
|
5007
5260
|
|
|
5008
5261
|
var getDirectionByAngle = function (angle, thresholdAngle) {
|
|
5009
5262
|
if (thresholdAngle < 0 || thresholdAngle > 90) {
|
|
@@ -5013,13 +5266,6 @@ version: 4.9.1
|
|
|
5013
5266
|
var toAngle = Math.abs(angle);
|
|
5014
5267
|
return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL;
|
|
5015
5268
|
};
|
|
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
5269
|
/**
|
|
5024
5270
|
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
5025
5271
|
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
@@ -5042,6 +5288,7 @@ version: 4.9.1
|
|
|
5042
5288
|
* @param {Number} [scale[1]=1] vertical axis scale <ko>수직축 배율</ko>
|
|
5043
5289
|
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
5044
5290
|
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
5291
|
+
* @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>
|
|
5045
5292
|
* @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>
|
|
5046
5293
|
* @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>
|
|
5047
5294
|
**/
|
|
@@ -5053,8 +5300,8 @@ version: 4.9.1
|
|
|
5053
5300
|
* @example
|
|
5054
5301
|
* ```js
|
|
5055
5302
|
* const pan = new eg.Axes.PanInput("#area", {
|
|
5056
|
-
*
|
|
5057
|
-
*
|
|
5303
|
+
* inputType: ["touch"],
|
|
5304
|
+
* scale: [1, 1.3],
|
|
5058
5305
|
* });
|
|
5059
5306
|
*
|
|
5060
5307
|
* // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved.
|
|
@@ -5067,7 +5314,7 @@ version: 4.9.1
|
|
|
5067
5314
|
* // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved.
|
|
5068
5315
|
* axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan);
|
|
5069
5316
|
* ```
|
|
5070
|
-
* @param {HTMLElement|
|
|
5317
|
+
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko>
|
|
5071
5318
|
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko>
|
|
5072
5319
|
*/
|
|
5073
5320
|
|
|
@@ -5086,18 +5333,19 @@ version: 4.9.1
|
|
|
5086
5333
|
this._activeEvent = null;
|
|
5087
5334
|
this._atRightEdge = false;
|
|
5088
5335
|
this._rightEdgeTimer = 0;
|
|
5336
|
+
this._dragged = false;
|
|
5089
5337
|
|
|
5090
|
-
this.
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
activeEvent.onRelease();
|
|
5338
|
+
this._preventClickWhenDragged = function (e) {
|
|
5339
|
+
if (_this._dragged) {
|
|
5340
|
+
e.preventDefault();
|
|
5341
|
+
e.stopPropagation();
|
|
5342
|
+
}
|
|
5097
5343
|
|
|
5098
|
-
_this.
|
|
5344
|
+
_this._dragged = false;
|
|
5099
5345
|
};
|
|
5100
5346
|
|
|
5347
|
+
this._voidFunction = function () {};
|
|
5348
|
+
|
|
5101
5349
|
this.element = $(el);
|
|
5102
5350
|
this.options = __assign$1({
|
|
5103
5351
|
inputType: ["touch", "mouse", "pointer"],
|
|
@@ -5105,6 +5353,7 @@ version: 4.9.1
|
|
|
5105
5353
|
scale: [1, 1],
|
|
5106
5354
|
thresholdAngle: 45,
|
|
5107
5355
|
threshold: 0,
|
|
5356
|
+
preventClickOnDrag: false,
|
|
5108
5357
|
iOSEdgeSwipeThreshold: IOS_EDGE_THRESHOLD,
|
|
5109
5358
|
releaseOnScroll: false,
|
|
5110
5359
|
touchAction: null
|
|
@@ -5117,19 +5366,7 @@ version: 4.9.1
|
|
|
5117
5366
|
var __proto = PanInput.prototype;
|
|
5118
5367
|
|
|
5119
5368
|
__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
|
-
|
|
5369
|
+
this._direction = getDirection(!!axes[0], !!axes[1]);
|
|
5133
5370
|
this.axes = axes;
|
|
5134
5371
|
};
|
|
5135
5372
|
|
|
@@ -5192,7 +5429,7 @@ version: 4.9.1
|
|
|
5192
5429
|
};
|
|
5193
5430
|
/**
|
|
5194
5431
|
* Returns whether to use an input device
|
|
5195
|
-
* @ko 입력
|
|
5432
|
+
* @ko 입력 장치 사용 여부를 반환한다.
|
|
5196
5433
|
* @return {Boolean} Whether to use an input device <ko>입력장치 사용여부</ko>
|
|
5197
5434
|
*/
|
|
5198
5435
|
|
|
@@ -5200,17 +5437,37 @@ version: 4.9.1
|
|
|
5200
5437
|
__proto.isEnabled = function () {
|
|
5201
5438
|
return this._enabled;
|
|
5202
5439
|
};
|
|
5440
|
+
/**
|
|
5441
|
+
* Releases current user input.
|
|
5442
|
+
* @ko 사용자의 입력을 강제로 중단시킨다.
|
|
5443
|
+
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5444
|
+
*/
|
|
5445
|
+
|
|
5446
|
+
|
|
5447
|
+
__proto.release = function () {
|
|
5448
|
+
var activeEvent = this._activeEvent;
|
|
5449
|
+
var prevEvent = activeEvent.prevEvent;
|
|
5450
|
+
activeEvent.onRelease();
|
|
5451
|
+
|
|
5452
|
+
this._observer.release(this, prevEvent, [0, 0]);
|
|
5453
|
+
|
|
5454
|
+
this._detachWindowEvent(activeEvent);
|
|
5455
|
+
|
|
5456
|
+
return this;
|
|
5457
|
+
};
|
|
5203
5458
|
|
|
5204
5459
|
__proto._onPanstart = function (event) {
|
|
5460
|
+
var inputButton = this.options.inputButton;
|
|
5205
5461
|
var activeEvent = this._activeEvent;
|
|
5206
|
-
var panEvent = activeEvent.onEventStart(event,
|
|
5462
|
+
var panEvent = activeEvent.onEventStart(event, inputButton);
|
|
5207
5463
|
|
|
5208
|
-
if (!panEvent || !this._enabled || activeEvent.getTouches(event) > 1) {
|
|
5464
|
+
if (!panEvent || !this._enabled || activeEvent.getTouches(event, inputButton) > 1) {
|
|
5209
5465
|
return;
|
|
5210
5466
|
}
|
|
5211
5467
|
|
|
5212
5468
|
if (panEvent.srcEvent.cancelable !== false) {
|
|
5213
5469
|
var edgeThreshold = this.options.iOSEdgeSwipeThreshold;
|
|
5470
|
+
this._dragged = false;
|
|
5214
5471
|
|
|
5215
5472
|
this._observer.hold(this, panEvent);
|
|
5216
5473
|
|
|
@@ -5225,31 +5482,33 @@ version: 4.9.1
|
|
|
5225
5482
|
__proto._onPanmove = function (event) {
|
|
5226
5483
|
var _this = this;
|
|
5227
5484
|
|
|
5228
|
-
var activeEvent = this._activeEvent;
|
|
5229
|
-
var panEvent = activeEvent.onEventMove(event, this.options.inputButton);
|
|
5230
|
-
|
|
5231
|
-
if (!panEvent || !this._enabled || activeEvent.getTouches(event) > 1) {
|
|
5232
|
-
return;
|
|
5233
|
-
}
|
|
5234
|
-
|
|
5235
5485
|
var _a = this.options,
|
|
5236
5486
|
iOSEdgeSwipeThreshold = _a.iOSEdgeSwipeThreshold,
|
|
5237
|
-
releaseOnScroll = _a.releaseOnScroll
|
|
5238
|
-
|
|
5487
|
+
releaseOnScroll = _a.releaseOnScroll,
|
|
5488
|
+
inputButton = _a.inputButton,
|
|
5489
|
+
thresholdAngle = _a.thresholdAngle;
|
|
5490
|
+
var activeEvent = this._activeEvent;
|
|
5491
|
+
var panEvent = activeEvent.onEventMove(event, inputButton);
|
|
5492
|
+
var touches = activeEvent.getTouches(event, inputButton);
|
|
5239
5493
|
|
|
5240
|
-
if (releaseOnScroll && !panEvent.srcEvent.cancelable) {
|
|
5494
|
+
if (touches === 0 || releaseOnScroll && panEvent && !panEvent.srcEvent.cancelable) {
|
|
5241
5495
|
this._onPanend(event);
|
|
5242
5496
|
|
|
5243
5497
|
return;
|
|
5244
5498
|
}
|
|
5245
5499
|
|
|
5500
|
+
if (!panEvent || !this._enabled || touches > 1) {
|
|
5501
|
+
return;
|
|
5502
|
+
}
|
|
5503
|
+
|
|
5504
|
+
var userDirection = getDirectionByAngle(panEvent.angle, thresholdAngle);
|
|
5505
|
+
|
|
5246
5506
|
if (activeEvent.prevEvent && IS_IOS_SAFARI) {
|
|
5247
5507
|
var swipeLeftToRight = panEvent.center.x < 0;
|
|
5248
5508
|
|
|
5249
5509
|
if (swipeLeftToRight) {
|
|
5250
5510
|
// iOS swipe left => right
|
|
5251
|
-
this.
|
|
5252
|
-
|
|
5511
|
+
this.release();
|
|
5253
5512
|
return;
|
|
5254
5513
|
} else if (this._atRightEdge) {
|
|
5255
5514
|
clearTimeout(this._rightEdgeTimer); // - is right to left
|
|
@@ -5261,13 +5520,13 @@ version: 4.9.1
|
|
|
5261
5520
|
} else {
|
|
5262
5521
|
// iOS swipe right => left
|
|
5263
5522
|
this._rightEdgeTimer = window.setTimeout(function () {
|
|
5264
|
-
return _this.
|
|
5523
|
+
return _this.release();
|
|
5265
5524
|
}, 100);
|
|
5266
5525
|
}
|
|
5267
5526
|
}
|
|
5268
5527
|
}
|
|
5269
5528
|
|
|
5270
|
-
var offset = this.
|
|
5529
|
+
var offset = this._getOffset([panEvent.offsetX, panEvent.offsetY], [useDirection(DIRECTION_HORIZONTAL, this._direction, userDirection), useDirection(DIRECTION_VERTICAL, this._direction, userDirection)]);
|
|
5271
5530
|
|
|
5272
5531
|
var prevent = offset.some(function (v) {
|
|
5273
5532
|
return v !== 0;
|
|
@@ -5284,6 +5543,8 @@ version: 4.9.1
|
|
|
5284
5543
|
panEvent.preventSystemEvent = prevent;
|
|
5285
5544
|
|
|
5286
5545
|
if (prevent) {
|
|
5546
|
+
this._dragged = true;
|
|
5547
|
+
|
|
5287
5548
|
this._observer.change(this, panEvent, toAxis(this.axes, offset));
|
|
5288
5549
|
}
|
|
5289
5550
|
|
|
@@ -5291,10 +5552,11 @@ version: 4.9.1
|
|
|
5291
5552
|
};
|
|
5292
5553
|
|
|
5293
5554
|
__proto._onPanend = function (event) {
|
|
5555
|
+
var inputButton = this.options.inputButton;
|
|
5294
5556
|
var activeEvent = this._activeEvent;
|
|
5295
5557
|
activeEvent.onEventEnd(event);
|
|
5296
5558
|
|
|
5297
|
-
if (!this._enabled || activeEvent.getTouches(event) !== 0) {
|
|
5559
|
+
if (!this._enabled || activeEvent.getTouches(event, inputButton) !== 0) {
|
|
5298
5560
|
return;
|
|
5299
5561
|
}
|
|
5300
5562
|
|
|
@@ -5303,7 +5565,7 @@ version: 4.9.1
|
|
|
5303
5565
|
clearTimeout(this._rightEdgeTimer);
|
|
5304
5566
|
var prevEvent = activeEvent.prevEvent;
|
|
5305
5567
|
|
|
5306
|
-
var velocity = this.
|
|
5568
|
+
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
5569
|
|
|
5308
5570
|
activeEvent.onRelease();
|
|
5309
5571
|
|
|
@@ -5336,28 +5598,39 @@ version: 4.9.1
|
|
|
5336
5598
|
});
|
|
5337
5599
|
};
|
|
5338
5600
|
|
|
5601
|
+
__proto._getOffset = function (properties, direction) {
|
|
5602
|
+
var scale = this.options.scale;
|
|
5603
|
+
return [direction[0] ? properties[0] * scale[0] : 0, direction[1] ? properties[1] * scale[1] : 0];
|
|
5604
|
+
};
|
|
5605
|
+
|
|
5339
5606
|
__proto._attachElementEvent = function (observer) {
|
|
5340
5607
|
var _this = this;
|
|
5341
5608
|
|
|
5342
5609
|
var activeEvent = convertInputType(this.options.inputType);
|
|
5610
|
+
var element = this.element;
|
|
5343
5611
|
|
|
5344
5612
|
if (!activeEvent) {
|
|
5345
5613
|
return;
|
|
5346
5614
|
}
|
|
5347
5615
|
|
|
5616
|
+
if (!element) {
|
|
5617
|
+
throw new Error("Element to connect input does not exist.");
|
|
5618
|
+
}
|
|
5619
|
+
|
|
5348
5620
|
this._observer = observer;
|
|
5349
5621
|
this._enabled = true;
|
|
5350
5622
|
this._activeEvent = activeEvent;
|
|
5351
|
-
activeEvent.start.forEach(function (event) {
|
|
5352
|
-
var _a;
|
|
5353
5623
|
|
|
5354
|
-
|
|
5624
|
+
if (this.options.preventClickOnDrag) {
|
|
5625
|
+
element.addEventListener("click", this._preventClickWhenDragged, true);
|
|
5626
|
+
}
|
|
5627
|
+
|
|
5628
|
+
activeEvent.start.forEach(function (event) {
|
|
5629
|
+
element.addEventListener(event, _this._onPanstart);
|
|
5355
5630
|
}); // adding event listener to element prevents invalid behavior in iOS Safari
|
|
5356
5631
|
|
|
5357
5632
|
activeEvent.move.forEach(function (event) {
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.addEventListener(event, function () {});
|
|
5633
|
+
element.addEventListener(event, _this._voidFunction);
|
|
5361
5634
|
});
|
|
5362
5635
|
};
|
|
5363
5636
|
|
|
@@ -5365,38 +5638,33 @@ version: 4.9.1
|
|
|
5365
5638
|
var _this = this;
|
|
5366
5639
|
|
|
5367
5640
|
var activeEvent = this._activeEvent;
|
|
5368
|
-
|
|
5369
|
-
var _a;
|
|
5370
|
-
|
|
5371
|
-
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.removeEventListener(event, _this._onPanstart);
|
|
5372
|
-
});
|
|
5373
|
-
activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) {
|
|
5374
|
-
var _a;
|
|
5375
|
-
|
|
5376
|
-
(_a = _this.element) === null || _a === void 0 ? void 0 : _a.removeEventListener(event, function () {});
|
|
5377
|
-
});
|
|
5378
|
-
this._enabled = false;
|
|
5379
|
-
this._observer = null;
|
|
5380
|
-
};
|
|
5381
|
-
|
|
5382
|
-
__proto._applyScale = function (properties, direction) {
|
|
5383
|
-
var offset = [0, 0];
|
|
5384
|
-
var scale = this.options.scale;
|
|
5641
|
+
var element = this.element;
|
|
5385
5642
|
|
|
5386
|
-
if (
|
|
5387
|
-
|
|
5388
|
-
|
|
5643
|
+
if (element) {
|
|
5644
|
+
if (this.options.preventClickOnDrag) {
|
|
5645
|
+
element.removeEventListener("click", this._preventClickWhenDragged, true);
|
|
5646
|
+
}
|
|
5389
5647
|
|
|
5390
|
-
|
|
5391
|
-
|
|
5648
|
+
activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.start.forEach(function (event) {
|
|
5649
|
+
element.removeEventListener(event, _this._onPanstart);
|
|
5650
|
+
});
|
|
5651
|
+
activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) {
|
|
5652
|
+
element.removeEventListener(event, _this._voidFunction);
|
|
5653
|
+
});
|
|
5392
5654
|
}
|
|
5393
5655
|
|
|
5394
|
-
|
|
5656
|
+
this._enabled = false;
|
|
5657
|
+
this._observer = null;
|
|
5395
5658
|
};
|
|
5396
5659
|
|
|
5397
5660
|
return PanInput;
|
|
5398
5661
|
}();
|
|
5399
5662
|
|
|
5663
|
+
/*
|
|
5664
|
+
* Copyright (c) 2015 NAVER Corp.
|
|
5665
|
+
* egjs projects are licensed under the MIT license
|
|
5666
|
+
*/
|
|
5667
|
+
|
|
5400
5668
|
var Axes$1 = Axes;
|
|
5401
5669
|
|
|
5402
5670
|
/**
|
|
@@ -5571,7 +5839,7 @@ version: 4.9.1
|
|
|
5571
5839
|
var moveEvent = new ComponentEvent$1(EVENTS.MOVE, {
|
|
5572
5840
|
isTrusted: axesEvent.isTrusted,
|
|
5573
5841
|
holding: this.holding,
|
|
5574
|
-
direction: getDirection(0, axesEvent.delta[POSITION_KEY]),
|
|
5842
|
+
direction: getDirection$1(0, axesEvent.delta[POSITION_KEY]),
|
|
5575
5843
|
axesEvent: axesEvent
|
|
5576
5844
|
});
|
|
5577
5845
|
flicking.trigger(moveEvent);
|
|
@@ -5659,7 +5927,7 @@ version: 4.9.1
|
|
|
5659
5927
|
var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
|
|
5660
5928
|
isTrusted: axesEvent.isTrusted,
|
|
5661
5929
|
holding: this.holding,
|
|
5662
|
-
direction: getDirection(animatingContext.start, animatingContext.end),
|
|
5930
|
+
direction: getDirection$1(animatingContext.start, animatingContext.end),
|
|
5663
5931
|
axesEvent: axesEvent
|
|
5664
5932
|
});
|
|
5665
5933
|
flicking.trigger(moveStartEvent);
|
|
@@ -5720,7 +5988,7 @@ version: 4.9.1
|
|
|
5720
5988
|
var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, {
|
|
5721
5989
|
isTrusted: axesEvent.isTrusted,
|
|
5722
5990
|
holding: this.holding,
|
|
5723
|
-
direction: getDirection(0, -offset),
|
|
5991
|
+
direction: getDirection$1(0, -offset),
|
|
5724
5992
|
axesEvent: axesEvent
|
|
5725
5993
|
});
|
|
5726
5994
|
flicking.trigger(moveStartEvent);
|
|
@@ -5822,7 +6090,7 @@ version: 4.9.1
|
|
|
5822
6090
|
index: clickedPanel.index,
|
|
5823
6091
|
panel: clickedPanel,
|
|
5824
6092
|
// Direction to the clicked panel
|
|
5825
|
-
direction: getDirection(cameraPosition, clickedPanelPosition)
|
|
6093
|
+
direction: getDirection$1(cameraPosition, clickedPanelPosition)
|
|
5826
6094
|
}));
|
|
5827
6095
|
}
|
|
5828
6096
|
};
|
|
@@ -5977,7 +6245,7 @@ version: 4.9.1
|
|
|
5977
6245
|
transitTo(STATE_TYPE.IDLE);
|
|
5978
6246
|
flicking.trigger(new ComponentEvent$1(EVENTS.MOVE_END, {
|
|
5979
6247
|
isTrusted: axesEvent.isTrusted,
|
|
5980
|
-
direction: getDirection(animatingContext.start, animatingContext.end),
|
|
6248
|
+
direction: getDirection$1(animatingContext.start, animatingContext.end),
|
|
5981
6249
|
axesEvent: axesEvent
|
|
5982
6250
|
}));
|
|
5983
6251
|
var targetPanel = this._targetPanel;
|
|
@@ -6419,6 +6687,20 @@ version: 4.9.1
|
|
|
6419
6687
|
(_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable();
|
|
6420
6688
|
return this;
|
|
6421
6689
|
};
|
|
6690
|
+
/**
|
|
6691
|
+
* Releases ongoing user input (mouse/touch)
|
|
6692
|
+
* @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다
|
|
6693
|
+
* @chainable
|
|
6694
|
+
* @return {this}
|
|
6695
|
+
*/
|
|
6696
|
+
|
|
6697
|
+
|
|
6698
|
+
__proto.release = function () {
|
|
6699
|
+
var _a;
|
|
6700
|
+
|
|
6701
|
+
(_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release();
|
|
6702
|
+
return this;
|
|
6703
|
+
};
|
|
6422
6704
|
/**
|
|
6423
6705
|
* Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state
|
|
6424
6706
|
* @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다
|
|
@@ -6730,6 +7012,19 @@ version: 4.9.1
|
|
|
6730
7012
|
|
|
6731
7013
|
return this;
|
|
6732
7014
|
};
|
|
7015
|
+
/**
|
|
7016
|
+
* Releases ongoing user input (mouse/touch)
|
|
7017
|
+
* @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다
|
|
7018
|
+
* @chainable
|
|
7019
|
+
* @return {this}
|
|
7020
|
+
*/
|
|
7021
|
+
|
|
7022
|
+
|
|
7023
|
+
__proto.release = function () {
|
|
7024
|
+
this._controller.release();
|
|
7025
|
+
|
|
7026
|
+
return this;
|
|
7027
|
+
};
|
|
6733
7028
|
/**
|
|
6734
7029
|
* Update position after resizing
|
|
6735
7030
|
* @ko resize 이후에 position을 업데이트합니다
|
|
@@ -6890,7 +7185,7 @@ version: 4.9.1
|
|
|
6890
7185
|
prevIndex: (_a = prevActivePanel === null || prevActivePanel === void 0 ? void 0 : prevActivePanel.index) !== null && _a !== void 0 ? _a : -1,
|
|
6891
7186
|
prevPanel: prevActivePanel,
|
|
6892
7187
|
isTrusted: isTrusted,
|
|
6893
|
-
direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE
|
|
7188
|
+
direction: prevActivePanel ? getDirection$1(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE
|
|
6894
7189
|
}));
|
|
6895
7190
|
} else {
|
|
6896
7191
|
flicking.trigger(new ComponentEvent$1(EVENTS.RESTORED, {
|
|
@@ -6910,7 +7205,7 @@ version: 4.9.1
|
|
|
6910
7205
|
index: panel.index,
|
|
6911
7206
|
panel: panel,
|
|
6912
7207
|
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)
|
|
7208
|
+
direction: getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position)
|
|
6914
7209
|
});
|
|
6915
7210
|
flicking.trigger(event);
|
|
6916
7211
|
|
|
@@ -8986,7 +9281,7 @@ version: 4.9.1
|
|
|
8986
9281
|
license: MIT
|
|
8987
9282
|
author: NAVER Corp.
|
|
8988
9283
|
repository: https://github.com/naver/egjs-imready
|
|
8989
|
-
version: 1.
|
|
9284
|
+
version: 1.3.0
|
|
8990
9285
|
*/
|
|
8991
9286
|
|
|
8992
9287
|
/*! *****************************************************************************
|
|
@@ -9073,8 +9368,12 @@ version: 4.9.1
|
|
|
9073
9368
|
|
|
9074
9369
|
return !!target.getAttribute(prefix + "width");
|
|
9075
9370
|
}
|
|
9076
|
-
function hasLoadingAttribute(target) {
|
|
9077
|
-
|
|
9371
|
+
function hasLoadingAttribute(target, prefix) {
|
|
9372
|
+
if (prefix === void 0) {
|
|
9373
|
+
prefix = "data-";
|
|
9374
|
+
}
|
|
9375
|
+
|
|
9376
|
+
return "loading" in target && target.getAttribute("loading") === "lazy" || !!target.getAttribute(prefix + "lazy");
|
|
9078
9377
|
}
|
|
9079
9378
|
function hasSkipAttribute(target, prefix) {
|
|
9080
9379
|
if (prefix === void 0) {
|
|
@@ -9199,6 +9498,11 @@ version: 4.9.1
|
|
|
9199
9498
|
|
|
9200
9499
|
if (e && e.type === "error") {
|
|
9201
9500
|
_this.onError(_this.element);
|
|
9501
|
+
}
|
|
9502
|
+
|
|
9503
|
+
if (_this.hasLoading && _this.checkElement()) {
|
|
9504
|
+
// I'm not ready
|
|
9505
|
+
return;
|
|
9202
9506
|
} // I'm pre-ready and ready!
|
|
9203
9507
|
|
|
9204
9508
|
|
|
@@ -9214,7 +9518,7 @@ version: 4.9.1
|
|
|
9214
9518
|
var prefix = _this.options.prefix;
|
|
9215
9519
|
_this.hasDataSize = hasSizeAttribute(element, prefix);
|
|
9216
9520
|
_this.isSkip = hasSkipAttribute(element, prefix);
|
|
9217
|
-
_this.hasLoading = hasLoadingAttribute(element);
|
|
9521
|
+
_this.hasLoading = hasLoadingAttribute(element, prefix);
|
|
9218
9522
|
return _this;
|
|
9219
9523
|
}
|
|
9220
9524
|
|
|
@@ -9600,6 +9904,7 @@ version: 4.9.1
|
|
|
9600
9904
|
|
|
9601
9905
|
var tagName = element.tagName.toLowerCase();
|
|
9602
9906
|
var loaders = this.options.loaders;
|
|
9907
|
+
var prefix = options.prefix;
|
|
9603
9908
|
var tags = Object.keys(loaders);
|
|
9604
9909
|
|
|
9605
9910
|
if (loaders[tagName]) {
|
|
@@ -9609,7 +9914,7 @@ version: 4.9.1
|
|
|
9609
9914
|
var loader = new ElementLoader(element, options);
|
|
9610
9915
|
var children = toArray(element.querySelectorAll(tags.join(", ")));
|
|
9611
9916
|
loader.setHasLoading(children.some(function (el) {
|
|
9612
|
-
return hasLoadingAttribute(el);
|
|
9917
|
+
return hasLoadingAttribute(el, prefix);
|
|
9613
9918
|
}));
|
|
9614
9919
|
var withPreReady = false;
|
|
9615
9920
|
var childrenImReady = this.clone().on("error", function (e) {
|
|
@@ -9694,13 +9999,13 @@ version: 4.9.1
|
|
|
9694
9999
|
* ```
|
|
9695
10000
|
*/
|
|
9696
10001
|
|
|
9697
|
-
this.trigger("error", {
|
|
10002
|
+
this.trigger(new ComponentEvent$1("error", {
|
|
9698
10003
|
element: info.element,
|
|
9699
10004
|
index: index,
|
|
9700
10005
|
target: target,
|
|
9701
10006
|
errorCount: this.getErrorCount(),
|
|
9702
10007
|
totalErrorCount: ++this.totalErrorCount
|
|
9703
|
-
});
|
|
10008
|
+
}));
|
|
9704
10009
|
};
|
|
9705
10010
|
|
|
9706
10011
|
__proto.onPreReadyElement = function (index) {
|
|
@@ -9734,7 +10039,7 @@ version: 4.9.1
|
|
|
9734
10039
|
* ```
|
|
9735
10040
|
*/
|
|
9736
10041
|
|
|
9737
|
-
this.trigger("preReadyElement", {
|
|
10042
|
+
this.trigger(new ComponentEvent$1("preReadyElement", {
|
|
9738
10043
|
element: info.element,
|
|
9739
10044
|
index: index,
|
|
9740
10045
|
preReadyCount: this.preReadyCount,
|
|
@@ -9744,7 +10049,7 @@ version: 4.9.1
|
|
|
9744
10049
|
isReady: this.isReady(),
|
|
9745
10050
|
hasLoading: info.hasLoading,
|
|
9746
10051
|
isSkip: info.isSkip
|
|
9747
|
-
});
|
|
10052
|
+
}));
|
|
9748
10053
|
};
|
|
9749
10054
|
|
|
9750
10055
|
__proto.onPreReady = function () {
|
|
@@ -9776,12 +10081,12 @@ version: 4.9.1
|
|
|
9776
10081
|
* ```
|
|
9777
10082
|
*/
|
|
9778
10083
|
|
|
9779
|
-
this.trigger("preReady", {
|
|
10084
|
+
this.trigger(new ComponentEvent$1("preReady", {
|
|
9780
10085
|
readyCount: this.readyCount,
|
|
9781
10086
|
totalCount: this.totalCount,
|
|
9782
10087
|
isReady: this.isReady(),
|
|
9783
10088
|
hasLoading: this.hasLoading()
|
|
9784
|
-
});
|
|
10089
|
+
}));
|
|
9785
10090
|
};
|
|
9786
10091
|
|
|
9787
10092
|
__proto.onReadyElement = function (index) {
|
|
@@ -9815,7 +10120,7 @@ version: 4.9.1
|
|
|
9815
10120
|
* ```
|
|
9816
10121
|
*/
|
|
9817
10122
|
|
|
9818
|
-
this.trigger("readyElement", {
|
|
10123
|
+
this.trigger(new ComponentEvent$1("readyElement", {
|
|
9819
10124
|
index: index,
|
|
9820
10125
|
element: info.element,
|
|
9821
10126
|
hasError: info.hasError,
|
|
@@ -9829,7 +10134,7 @@ version: 4.9.1
|
|
|
9829
10134
|
hasLoading: info.hasLoading,
|
|
9830
10135
|
isPreReadyOver: this.isPreReadyOver,
|
|
9831
10136
|
isSkip: info.isSkip
|
|
9832
|
-
});
|
|
10137
|
+
}));
|
|
9833
10138
|
};
|
|
9834
10139
|
|
|
9835
10140
|
__proto.onReady = function () {
|
|
@@ -9863,11 +10168,11 @@ version: 4.9.1
|
|
|
9863
10168
|
* });
|
|
9864
10169
|
* ```
|
|
9865
10170
|
*/
|
|
9866
|
-
this.trigger("ready", {
|
|
10171
|
+
this.trigger(new ComponentEvent$1("ready", {
|
|
9867
10172
|
errorCount: this.getErrorCount(),
|
|
9868
10173
|
totalErrorCount: this.totalErrorCount,
|
|
9869
10174
|
totalCount: this.totalCount
|
|
9870
|
-
});
|
|
10175
|
+
}));
|
|
9871
10176
|
};
|
|
9872
10177
|
|
|
9873
10178
|
__proto.getErrorCount = function () {
|
|
@@ -13024,6 +13329,10 @@ version: 4.9.1
|
|
|
13024
13329
|
return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING));
|
|
13025
13330
|
}
|
|
13026
13331
|
|
|
13332
|
+
if (this._control.holding) {
|
|
13333
|
+
this._control.controller.release();
|
|
13334
|
+
}
|
|
13335
|
+
|
|
13027
13336
|
return this._control.moveToPanel(panel, {
|
|
13028
13337
|
duration: duration,
|
|
13029
13338
|
direction: direction
|
|
@@ -13572,7 +13881,7 @@ version: 4.9.1
|
|
|
13572
13881
|
*/
|
|
13573
13882
|
|
|
13574
13883
|
|
|
13575
|
-
Flicking.VERSION = "4.9.
|
|
13884
|
+
Flicking.VERSION = "4.9.3";
|
|
13576
13885
|
return Flicking;
|
|
13577
13886
|
}(Component);
|
|
13578
13887
|
|