@egjs/flicking 4.14.0 → 4.14.1-beta.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/dist/flicking.cjs.js +18 -13
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +18 -13
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +18 -13
- 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 +69 -64
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/cfc/sync.ts +10 -0
- package/src/control/Control.ts +3 -1
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.14.
|
|
7
|
+
version: 4.14.1-beta.3
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -26,7 +26,7 @@ version: 4.14.0
|
|
|
26
26
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
27
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
28
|
***************************************************************************** */
|
|
29
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
29
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
30
30
|
|
|
31
31
|
var extendStatics$3 = function (d, b) {
|
|
32
32
|
extendStatics$3 = Object.setPrototypeOf || {
|
|
@@ -96,12 +96,8 @@ version: 4.14.0
|
|
|
96
96
|
f,
|
|
97
97
|
y,
|
|
98
98
|
t,
|
|
99
|
-
g;
|
|
100
|
-
return g = {
|
|
101
|
-
next: verb(0),
|
|
102
|
-
"throw": verb(1),
|
|
103
|
-
"return": verb(2)
|
|
104
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
99
|
+
g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
100
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
105
101
|
return this;
|
|
106
102
|
}), g;
|
|
107
103
|
function verb(n) {
|
|
@@ -226,7 +222,7 @@ version: 4.14.0
|
|
|
226
222
|
license: MIT
|
|
227
223
|
author: NAVER Corp.
|
|
228
224
|
repository: https://github.com/naver/egjs-component
|
|
229
|
-
version: 3.0.
|
|
225
|
+
version: 3.0.5
|
|
230
226
|
*/
|
|
231
227
|
/*! *****************************************************************************
|
|
232
228
|
Copyright (c) Microsoft Corporation.
|
|
@@ -558,7 +554,6 @@ version: 4.14.0
|
|
|
558
554
|
* ```
|
|
559
555
|
*/
|
|
560
556
|
__proto.off = function (eventName, handlerToDetach) {
|
|
561
|
-
var e_1, _a;
|
|
562
557
|
// Detach all event handlers.
|
|
563
558
|
if (isUndefined(eventName)) {
|
|
564
559
|
this._eventHandler = {};
|
|
@@ -580,28 +575,14 @@ version: 4.14.0
|
|
|
580
575
|
// Detach single event handler
|
|
581
576
|
var handlerList = this._eventHandler[eventName];
|
|
582
577
|
if (handlerList) {
|
|
583
|
-
var
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
if (
|
|
588
|
-
|
|
589
|
-
if (handlerList.length <= 0) {
|
|
590
|
-
delete this._eventHandler[eventName];
|
|
591
|
-
}
|
|
592
|
-
break;
|
|
578
|
+
var length = handlerList.length;
|
|
579
|
+
for (var i = 0; i < length; ++i) {
|
|
580
|
+
if (handlerList[i] === handlerToDetach) {
|
|
581
|
+
handlerList.splice(i, 1);
|
|
582
|
+
if (length <= 1) {
|
|
583
|
+
delete this._eventHandler[eventName];
|
|
593
584
|
}
|
|
594
|
-
|
|
595
|
-
}
|
|
596
|
-
} catch (e_1_1) {
|
|
597
|
-
e_1 = {
|
|
598
|
-
error: e_1_1
|
|
599
|
-
};
|
|
600
|
-
} finally {
|
|
601
|
-
try {
|
|
602
|
-
if (handlerList_1_1 && !handlerList_1_1.done && (_a = handlerList_1.return)) _a.call(handlerList_1);
|
|
603
|
-
} finally {
|
|
604
|
-
if (e_1) throw e_1.error;
|
|
585
|
+
break;
|
|
605
586
|
}
|
|
606
587
|
}
|
|
607
588
|
}
|
|
@@ -616,7 +597,7 @@ version: 4.14.0
|
|
|
616
597
|
* Component.VERSION; // ex) 3.0.0
|
|
617
598
|
* @memberof Component
|
|
618
599
|
*/
|
|
619
|
-
Component.VERSION = "3.0.
|
|
600
|
+
Component.VERSION = "3.0.5";
|
|
620
601
|
return Component;
|
|
621
602
|
}();
|
|
622
603
|
|
|
@@ -1862,8 +1843,8 @@ version: 4.14.0
|
|
|
1862
1843
|
name: @egjs/agent
|
|
1863
1844
|
license: MIT
|
|
1864
1845
|
author: NAVER Corp.
|
|
1865
|
-
repository: git+https://github.com/naver/agent.git
|
|
1866
|
-
version: 2.4.
|
|
1846
|
+
repository: git+https://github.com/naver/egjs-agent.git
|
|
1847
|
+
version: 2.4.4
|
|
1867
1848
|
*/
|
|
1868
1849
|
function some(arr, callback) {
|
|
1869
1850
|
var length = arr.length;
|
|
@@ -2165,12 +2146,12 @@ version: 4.14.0
|
|
|
2165
2146
|
});
|
|
2166
2147
|
var chromiumBrand = findPresetBrand(CHROMIUM_PRESETS, brands);
|
|
2167
2148
|
browser.chromium = !!chromiumBrand.brand;
|
|
2168
|
-
browser.chromiumVersion = chromiumBrand.version;
|
|
2149
|
+
browser.chromiumVersion = chromiumBrand.version || "-1";
|
|
2169
2150
|
|
|
2170
2151
|
if (!browser.chromium) {
|
|
2171
2152
|
var webkitBrand = findPresetBrand(WEBKIT_PRESETS, brands);
|
|
2172
2153
|
browser.webkit = !!webkitBrand.brand;
|
|
2173
|
-
browser.webkitVersion = webkitBrand.version;
|
|
2154
|
+
browser.webkitVersion = webkitBrand.version || "-1";
|
|
2174
2155
|
}
|
|
2175
2156
|
|
|
2176
2157
|
var platfomResult = find(OS_PRESETS, function (preset) {
|
|
@@ -2179,7 +2160,7 @@ version: 4.14.0
|
|
|
2179
2160
|
os.name = platfomResult ? platfomResult.id : "";
|
|
2180
2161
|
|
|
2181
2162
|
if (osData) {
|
|
2182
|
-
os.version = osData.platformVersion;
|
|
2163
|
+
os.version = osData.platformVersion || "-1";
|
|
2183
2164
|
}
|
|
2184
2165
|
|
|
2185
2166
|
if (fullVersionList && fullVersionList.length) {
|
|
@@ -3104,7 +3085,7 @@ version: 4.14.0
|
|
|
3104
3085
|
license: MIT
|
|
3105
3086
|
author: NAVER Corp.
|
|
3106
3087
|
repository: https://github.com/naver/egjs-axes
|
|
3107
|
-
version: 3.9.
|
|
3088
|
+
version: 3.9.2
|
|
3108
3089
|
*/
|
|
3109
3090
|
|
|
3110
3091
|
/*! *****************************************************************************
|
|
@@ -4030,6 +4011,19 @@ version: 4.14.0
|
|
|
4030
4011
|
var deltaTime = latestInterval ? timeStamp - latestInterval.timestamp : 0;
|
|
4031
4012
|
var velocityX = prevEvent ? prevEvent.velocityX : 0;
|
|
4032
4013
|
var velocityY = prevEvent ? prevEvent.velocityY : 0;
|
|
4014
|
+
var directionX = prevEvent ? prevEvent.directionX : 1;
|
|
4015
|
+
var directionY = prevEvent ? prevEvent.directionY : 1;
|
|
4016
|
+
// If offset is 0, it inherits the direction of the previous event.
|
|
4017
|
+
if (offsetX > 0) {
|
|
4018
|
+
directionX = 1;
|
|
4019
|
+
} else if (offsetX < 0) {
|
|
4020
|
+
directionX = -1;
|
|
4021
|
+
}
|
|
4022
|
+
if (offsetY > 0) {
|
|
4023
|
+
directionY = 1;
|
|
4024
|
+
} else if (offsetY < 0) {
|
|
4025
|
+
directionY = -1;
|
|
4026
|
+
}
|
|
4033
4027
|
if (!latestInterval || deltaTime >= VELOCITY_INTERVAL) {
|
|
4034
4028
|
if (latestInterval) {
|
|
4035
4029
|
_a = [(deltaX - latestInterval.deltaX) / deltaTime, (deltaY - latestInterval.deltaY) / deltaTime], velocityX = _a[0], velocityY = _a[1];
|
|
@@ -4049,6 +4043,8 @@ version: 4.14.0
|
|
|
4049
4043
|
deltaY: deltaY,
|
|
4050
4044
|
offsetX: offsetX,
|
|
4051
4045
|
offsetY: offsetY,
|
|
4046
|
+
directionX: directionX,
|
|
4047
|
+
directionY: directionY,
|
|
4052
4048
|
velocityX: velocityX,
|
|
4053
4049
|
velocityY: velocityY,
|
|
4054
4050
|
preventSystemEvent: true
|
|
@@ -5512,7 +5508,7 @@ version: 4.14.0
|
|
|
5512
5508
|
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5513
5509
|
* ```
|
|
5514
5510
|
*/
|
|
5515
|
-
Axes.VERSION = "3.9.
|
|
5511
|
+
Axes.VERSION = "3.9.2";
|
|
5516
5512
|
/* eslint-enable */
|
|
5517
5513
|
/**
|
|
5518
5514
|
* @name TRANSFORM
|
|
@@ -5729,7 +5725,10 @@ version: 4.14.0
|
|
|
5729
5725
|
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5730
5726
|
*/
|
|
5731
5727
|
__proto.enable = function () {
|
|
5732
|
-
|
|
5728
|
+
var activeEvent = convertInputType(this.options.inputType);
|
|
5729
|
+
if (!activeEvent) {
|
|
5730
|
+
throw new Error("PanInput cannot be enabled if there is no available input event.");
|
|
5731
|
+
} else if (!this._enabled) {
|
|
5733
5732
|
this._enabled = true;
|
|
5734
5733
|
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5735
5734
|
}
|
|
@@ -5863,7 +5862,7 @@ version: 4.14.0
|
|
|
5863
5862
|
this._detachWindowEvent(activeEvent);
|
|
5864
5863
|
clearTimeout(this._rightEdgeTimer);
|
|
5865
5864
|
var prevEvent = activeEvent.prevEvent;
|
|
5866
|
-
var velocity = this._isOverThreshold ? this._getOffset([Math.abs(prevEvent.velocityX) *
|
|
5865
|
+
var velocity = this._isOverThreshold ? this._getOffset([Math.abs(prevEvent.velocityX) * prevEvent.directionX, Math.abs(prevEvent.velocityY) * prevEvent.directionY], [useDirection(DIRECTION_HORIZONTAL, this._direction), useDirection(DIRECTION_VERTICAL, this._direction)]) : [0, 0];
|
|
5867
5866
|
activeEvent.onRelease();
|
|
5868
5867
|
this._observer.release(this, prevEvent, velocity);
|
|
5869
5868
|
};
|
|
@@ -7336,9 +7335,12 @@ version: 4.14.0
|
|
|
7336
7335
|
return __generator(this, function (_a) {
|
|
7337
7336
|
switch (_a.label) {
|
|
7338
7337
|
case 0:
|
|
7338
|
+
if (!flicking.initialized) return [3 /*break*/, 2];
|
|
7339
7339
|
return [4 /*yield*/, flicking.renderer.render()];
|
|
7340
7340
|
case 1:
|
|
7341
7341
|
_a.sent();
|
|
7342
|
+
_a.label = 2;
|
|
7343
|
+
case 2:
|
|
7342
7344
|
return [2 /*return*/];
|
|
7343
7345
|
}
|
|
7344
7346
|
});
|
|
@@ -7351,7 +7353,6 @@ version: 4.14.0
|
|
|
7351
7353
|
});
|
|
7352
7354
|
});
|
|
7353
7355
|
};
|
|
7354
|
-
|
|
7355
7356
|
__proto._getPosition = function (panel, direction) {
|
|
7356
7357
|
if (direction === void 0) {
|
|
7357
7358
|
direction = DIRECTION.NONE;
|
|
@@ -9185,7 +9186,7 @@ version: 4.14.0
|
|
|
9185
9186
|
license: MIT
|
|
9186
9187
|
author: NAVER Corp.
|
|
9187
9188
|
repository: https://github.com/naver/egjs-imready
|
|
9188
|
-
version: 1.4.
|
|
9189
|
+
version: 1.4.2
|
|
9189
9190
|
*/
|
|
9190
9191
|
|
|
9191
9192
|
/******************************************************************************
|
|
@@ -9383,9 +9384,7 @@ version: 4.14.0
|
|
|
9383
9384
|
// I'm not ready
|
|
9384
9385
|
return;
|
|
9385
9386
|
}
|
|
9386
|
-
|
|
9387
|
-
var withPreReady = !_this.hasDataSize && !_this.hasLoading;
|
|
9388
|
-
_this.onReady(withPreReady);
|
|
9387
|
+
_this.onReady();
|
|
9389
9388
|
};
|
|
9390
9389
|
_this.options = __assign({
|
|
9391
9390
|
prefix: "data-"
|
|
@@ -9401,7 +9400,7 @@ version: 4.14.0
|
|
|
9401
9400
|
__proto.check = function () {
|
|
9402
9401
|
if (this.isSkip || !this.checkElement()) {
|
|
9403
9402
|
// I'm Ready
|
|
9404
|
-
this.onAlreadyReady(
|
|
9403
|
+
this.onAlreadyReady();
|
|
9405
9404
|
return false;
|
|
9406
9405
|
}
|
|
9407
9406
|
if (this.hasDataSize) {
|
|
@@ -9447,6 +9446,7 @@ version: 4.14.0
|
|
|
9447
9446
|
});
|
|
9448
9447
|
};
|
|
9449
9448
|
__proto.onPreReady = function () {
|
|
9449
|
+
// 이전에 호출되었거나 ready가 발생했다면 preReady를 발생하지 않는다.
|
|
9450
9450
|
if (this.isPreReady) {
|
|
9451
9451
|
return;
|
|
9452
9452
|
}
|
|
@@ -9457,19 +9457,18 @@ version: 4.14.0
|
|
|
9457
9457
|
isSkip: this.isSkip
|
|
9458
9458
|
});
|
|
9459
9459
|
};
|
|
9460
|
-
__proto.onReady = function (
|
|
9460
|
+
__proto.onReady = function () {
|
|
9461
|
+
var isPreReady = this.isPreReady;
|
|
9462
|
+
this.isPreReady = true;
|
|
9461
9463
|
if (this.isReady) {
|
|
9462
9464
|
return;
|
|
9463
9465
|
}
|
|
9464
|
-
withPreReady = !this.isPreReady && withPreReady;
|
|
9465
|
-
if (withPreReady) {
|
|
9466
|
-
this.isPreReady = true;
|
|
9467
|
-
}
|
|
9468
9466
|
this.removeAutoSizer();
|
|
9469
9467
|
this.isReady = true;
|
|
9468
|
+
// preReady가 호출이 되지 않았으면 ready 이벤트만 발생하고 대신 withPreReady가 활성화
|
|
9470
9469
|
this.trigger("ready", {
|
|
9471
9470
|
element: this.element,
|
|
9472
|
-
withPreReady:
|
|
9471
|
+
withPreReady: !isPreReady,
|
|
9473
9472
|
hasLoading: this.hasLoading,
|
|
9474
9473
|
isSkip: this.isSkip
|
|
9475
9474
|
});
|
|
@@ -9486,10 +9485,10 @@ version: 4.14.0
|
|
|
9486
9485
|
_this.onPreReady();
|
|
9487
9486
|
});
|
|
9488
9487
|
};
|
|
9489
|
-
__proto.onAlreadyReady = function (
|
|
9488
|
+
__proto.onAlreadyReady = function () {
|
|
9490
9489
|
var _this = this;
|
|
9491
9490
|
setTimeout(function () {
|
|
9492
|
-
_this.onReady(
|
|
9491
|
+
_this.onReady();
|
|
9493
9492
|
});
|
|
9494
9493
|
};
|
|
9495
9494
|
Loader.EVENTS = [];
|
|
@@ -9508,7 +9507,7 @@ version: 4.14.0
|
|
|
9508
9507
|
__proto.check = function () {
|
|
9509
9508
|
if (this.isSkip) {
|
|
9510
9509
|
// I'm Ready
|
|
9511
|
-
this.onAlreadyReady(
|
|
9510
|
+
this.onAlreadyReady();
|
|
9512
9511
|
return false;
|
|
9513
9512
|
}
|
|
9514
9513
|
if (this.hasDataSize) {
|
|
@@ -9715,18 +9714,17 @@ version: 4.14.0
|
|
|
9715
9714
|
loader.setHasLoading(children.some(function (el) {
|
|
9716
9715
|
return hasLoadingAttribute(el, prefix);
|
|
9717
9716
|
}));
|
|
9718
|
-
var withPreReady = false;
|
|
9719
9717
|
var childrenImReady = this.clone().on("error", function (e) {
|
|
9720
9718
|
loader.onError(e.target);
|
|
9721
9719
|
}).on("ready", function () {
|
|
9722
|
-
loader.onReady(
|
|
9720
|
+
loader.onReady();
|
|
9723
9721
|
});
|
|
9724
9722
|
loader.on("requestChildren", function () {
|
|
9725
9723
|
// has not data size
|
|
9726
9724
|
var contentElements = getContentElements(element, tags, _this.options.prefix);
|
|
9727
9725
|
childrenImReady.check(contentElements).on("preReady", function (e) {
|
|
9728
|
-
|
|
9729
|
-
|
|
9726
|
+
if (!e.isReady) {
|
|
9727
|
+
// isReady가 아닌 경우에만 발생 / ready에서 동시에 발생할 가능성 있음.
|
|
9730
9728
|
loader.onPreReady();
|
|
9731
9729
|
}
|
|
9732
9730
|
});
|
|
@@ -10568,7 +10566,6 @@ version: 4.14.0
|
|
|
10568
10566
|
});
|
|
10569
10567
|
});
|
|
10570
10568
|
};
|
|
10571
|
-
|
|
10572
10569
|
__proto._collectPanels = function () {
|
|
10573
10570
|
var flicking = getFlickingAttached(this._flicking);
|
|
10574
10571
|
var camera = flicking.camera;
|
|
@@ -13304,7 +13301,6 @@ version: 4.14.0
|
|
|
13304
13301
|
if (!this._initialized) {
|
|
13305
13302
|
return [2 /*return*/];
|
|
13306
13303
|
}
|
|
13307
|
-
|
|
13308
13304
|
renderer.updatePanelSize();
|
|
13309
13305
|
camera.updateAlignPos();
|
|
13310
13306
|
camera.updateRange();
|
|
@@ -13318,7 +13314,6 @@ version: 4.14.0
|
|
|
13318
13314
|
if (!this._initialized) {
|
|
13319
13315
|
return [2 /*return*/];
|
|
13320
13316
|
}
|
|
13321
|
-
|
|
13322
13317
|
if (control.animating) ; else {
|
|
13323
13318
|
control.updatePosition(prevProgressInPanel);
|
|
13324
13319
|
control.updateInput();
|
|
@@ -13556,7 +13551,7 @@ version: 4.14.0
|
|
|
13556
13551
|
* Flicking.VERSION; // ex) 4.0.0
|
|
13557
13552
|
* ```
|
|
13558
13553
|
*/
|
|
13559
|
-
Flicking.VERSION = "4.14.
|
|
13554
|
+
Flicking.VERSION = "4.14.1-beta.3";
|
|
13560
13555
|
return Flicking;
|
|
13561
13556
|
}(Component);
|
|
13562
13557
|
|
|
@@ -14053,6 +14048,16 @@ version: 4.14.0
|
|
|
14053
14048
|
}
|
|
14054
14049
|
if (diffResult.added.length > 0 || diffResult.removed.length > 0) {
|
|
14055
14050
|
renderer.updateAfterPanelChange(added, removed);
|
|
14051
|
+
} else if (diffResult.ordered.length > 0) {
|
|
14052
|
+
var camera = flicking.camera;
|
|
14053
|
+
// 순서 변경으로 인한 index 변경 및 range 값 변경
|
|
14054
|
+
camera.updateRange();
|
|
14055
|
+
// index 변경으로 인한 카메라 위치 즉시 변경
|
|
14056
|
+
camera.updateOffset();
|
|
14057
|
+
// 순서 변경으로 인한 anchors 전부 업데이트
|
|
14058
|
+
camera.updateAnchors();
|
|
14059
|
+
// need panel 여부 재확인 필요
|
|
14060
|
+
camera.resetNeedPanelHistory();
|
|
14056
14061
|
}
|
|
14057
14062
|
});
|
|
14058
14063
|
var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) {
|