@egjs/flicking 4.14.2-beta.0 → 4.14.2-beta.1
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/Flicking.d.ts +9 -1
- package/declaration/renderer/Renderer.d.ts +1 -0
- package/dist/flicking.cjs.js +96 -16
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +96 -16
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +96 -16
- 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 +147 -67
- 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/Flicking.ts +39 -1
- package/src/cfc/getRenderingPanels.ts +9 -5
- package/src/control/AxesController.ts +2 -2
- package/src/control/Control.ts +1 -1
- package/src/renderer/Renderer.ts +20 -0
- package/src/renderer/VanillaRenderer.ts +11 -3
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.2-beta.
|
|
7
|
+
version: 4.14.2-beta.1
|
|
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.2-beta.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 */
|
|
30
30
|
|
|
31
31
|
var extendStatics$3 = function (d, b) {
|
|
32
32
|
extendStatics$3 = Object.setPrototypeOf || {
|
|
@@ -96,8 +96,12 @@ version: 4.14.2-beta.0
|
|
|
96
96
|
f,
|
|
97
97
|
y,
|
|
98
98
|
t,
|
|
99
|
-
g
|
|
100
|
-
return g
|
|
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 () {
|
|
101
105
|
return this;
|
|
102
106
|
}), g;
|
|
103
107
|
function verb(n) {
|
|
@@ -222,7 +226,7 @@ version: 4.14.2-beta.0
|
|
|
222
226
|
license: MIT
|
|
223
227
|
author: NAVER Corp.
|
|
224
228
|
repository: https://github.com/naver/egjs-component
|
|
225
|
-
version: 3.0.
|
|
229
|
+
version: 3.0.4
|
|
226
230
|
*/
|
|
227
231
|
/*! *****************************************************************************
|
|
228
232
|
Copyright (c) Microsoft Corporation.
|
|
@@ -554,6 +558,7 @@ version: 4.14.2-beta.0
|
|
|
554
558
|
* ```
|
|
555
559
|
*/
|
|
556
560
|
__proto.off = function (eventName, handlerToDetach) {
|
|
561
|
+
var e_1, _a;
|
|
557
562
|
// Detach all event handlers.
|
|
558
563
|
if (isUndefined(eventName)) {
|
|
559
564
|
this._eventHandler = {};
|
|
@@ -575,14 +580,28 @@ version: 4.14.2-beta.0
|
|
|
575
580
|
// Detach single event handler
|
|
576
581
|
var handlerList = this._eventHandler[eventName];
|
|
577
582
|
if (handlerList) {
|
|
578
|
-
var
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
if (
|
|
583
|
-
|
|
583
|
+
var idx = 0;
|
|
584
|
+
try {
|
|
585
|
+
for (var handlerList_1 = __values(handlerList), handlerList_1_1 = handlerList_1.next(); !handlerList_1_1.done; handlerList_1_1 = handlerList_1.next()) {
|
|
586
|
+
var handlerFunction = handlerList_1_1.value;
|
|
587
|
+
if (handlerFunction === handlerToDetach) {
|
|
588
|
+
handlerList.splice(idx, 1);
|
|
589
|
+
if (handlerList.length <= 0) {
|
|
590
|
+
delete this._eventHandler[eventName];
|
|
591
|
+
}
|
|
592
|
+
break;
|
|
584
593
|
}
|
|
585
|
-
|
|
594
|
+
idx++;
|
|
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;
|
|
586
605
|
}
|
|
587
606
|
}
|
|
588
607
|
}
|
|
@@ -597,7 +616,7 @@ version: 4.14.2-beta.0
|
|
|
597
616
|
* Component.VERSION; // ex) 3.0.0
|
|
598
617
|
* @memberof Component
|
|
599
618
|
*/
|
|
600
|
-
Component.VERSION = "3.0.
|
|
619
|
+
Component.VERSION = "3.0.4";
|
|
601
620
|
return Component;
|
|
602
621
|
}();
|
|
603
622
|
|
|
@@ -1846,8 +1865,8 @@ version: 4.14.2-beta.0
|
|
|
1846
1865
|
name: @egjs/agent
|
|
1847
1866
|
license: MIT
|
|
1848
1867
|
author: NAVER Corp.
|
|
1849
|
-
repository: git+https://github.com/naver/
|
|
1850
|
-
version: 2.4.
|
|
1868
|
+
repository: git+https://github.com/naver/agent.git
|
|
1869
|
+
version: 2.4.3
|
|
1851
1870
|
*/
|
|
1852
1871
|
function some(arr, callback) {
|
|
1853
1872
|
var length = arr.length;
|
|
@@ -2149,12 +2168,12 @@ version: 4.14.2-beta.0
|
|
|
2149
2168
|
});
|
|
2150
2169
|
var chromiumBrand = findPresetBrand(CHROMIUM_PRESETS, brands);
|
|
2151
2170
|
browser.chromium = !!chromiumBrand.brand;
|
|
2152
|
-
browser.chromiumVersion = chromiumBrand.version
|
|
2171
|
+
browser.chromiumVersion = chromiumBrand.version;
|
|
2153
2172
|
|
|
2154
2173
|
if (!browser.chromium) {
|
|
2155
2174
|
var webkitBrand = findPresetBrand(WEBKIT_PRESETS, brands);
|
|
2156
2175
|
browser.webkit = !!webkitBrand.brand;
|
|
2157
|
-
browser.webkitVersion = webkitBrand.version
|
|
2176
|
+
browser.webkitVersion = webkitBrand.version;
|
|
2158
2177
|
}
|
|
2159
2178
|
|
|
2160
2179
|
var platfomResult = find(OS_PRESETS, function (preset) {
|
|
@@ -2163,7 +2182,7 @@ version: 4.14.2-beta.0
|
|
|
2163
2182
|
os.name = platfomResult ? platfomResult.id : "";
|
|
2164
2183
|
|
|
2165
2184
|
if (osData) {
|
|
2166
|
-
os.version = osData.platformVersion
|
|
2185
|
+
os.version = osData.platformVersion;
|
|
2167
2186
|
}
|
|
2168
2187
|
|
|
2169
2188
|
if (fullVersionList && fullVersionList.length) {
|
|
@@ -3088,7 +3107,7 @@ version: 4.14.2-beta.0
|
|
|
3088
3107
|
license: MIT
|
|
3089
3108
|
author: NAVER Corp.
|
|
3090
3109
|
repository: https://github.com/naver/egjs-axes
|
|
3091
|
-
version: 3.9.
|
|
3110
|
+
version: 3.9.1
|
|
3092
3111
|
*/
|
|
3093
3112
|
|
|
3094
3113
|
/*! *****************************************************************************
|
|
@@ -4014,19 +4033,6 @@ version: 4.14.2-beta.0
|
|
|
4014
4033
|
var deltaTime = latestInterval ? timeStamp - latestInterval.timestamp : 0;
|
|
4015
4034
|
var velocityX = prevEvent ? prevEvent.velocityX : 0;
|
|
4016
4035
|
var velocityY = prevEvent ? prevEvent.velocityY : 0;
|
|
4017
|
-
var directionX = prevEvent ? prevEvent.directionX : 1;
|
|
4018
|
-
var directionY = prevEvent ? prevEvent.directionY : 1;
|
|
4019
|
-
// If offset is 0, it inherits the direction of the previous event.
|
|
4020
|
-
if (offsetX > 0) {
|
|
4021
|
-
directionX = 1;
|
|
4022
|
-
} else if (offsetX < 0) {
|
|
4023
|
-
directionX = -1;
|
|
4024
|
-
}
|
|
4025
|
-
if (offsetY > 0) {
|
|
4026
|
-
directionY = 1;
|
|
4027
|
-
} else if (offsetY < 0) {
|
|
4028
|
-
directionY = -1;
|
|
4029
|
-
}
|
|
4030
4036
|
if (!latestInterval || deltaTime >= VELOCITY_INTERVAL) {
|
|
4031
4037
|
if (latestInterval) {
|
|
4032
4038
|
_a = [(deltaX - latestInterval.deltaX) / deltaTime, (deltaY - latestInterval.deltaY) / deltaTime], velocityX = _a[0], velocityY = _a[1];
|
|
@@ -4046,8 +4052,6 @@ version: 4.14.2-beta.0
|
|
|
4046
4052
|
deltaY: deltaY,
|
|
4047
4053
|
offsetX: offsetX,
|
|
4048
4054
|
offsetY: offsetY,
|
|
4049
|
-
directionX: directionX,
|
|
4050
|
-
directionY: directionY,
|
|
4051
4055
|
velocityX: velocityX,
|
|
4052
4056
|
velocityY: velocityY,
|
|
4053
4057
|
preventSystemEvent: true
|
|
@@ -5511,7 +5515,7 @@ version: 4.14.2-beta.0
|
|
|
5511
5515
|
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5512
5516
|
* ```
|
|
5513
5517
|
*/
|
|
5514
|
-
Axes.VERSION = "3.9.
|
|
5518
|
+
Axes.VERSION = "3.9.1";
|
|
5515
5519
|
/* eslint-enable */
|
|
5516
5520
|
/**
|
|
5517
5521
|
* @name TRANSFORM
|
|
@@ -5728,10 +5732,7 @@ version: 4.14.2-beta.0
|
|
|
5728
5732
|
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5729
5733
|
*/
|
|
5730
5734
|
__proto.enable = function () {
|
|
5731
|
-
|
|
5732
|
-
if (!activeEvent) {
|
|
5733
|
-
throw new Error("PanInput cannot be enabled if there is no available input event.");
|
|
5734
|
-
} else if (!this._enabled) {
|
|
5735
|
+
if (!this._enabled) {
|
|
5735
5736
|
this._enabled = true;
|
|
5736
5737
|
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5737
5738
|
}
|
|
@@ -5865,7 +5866,7 @@ version: 4.14.2-beta.0
|
|
|
5865
5866
|
this._detachWindowEvent(activeEvent);
|
|
5866
5867
|
clearTimeout(this._rightEdgeTimer);
|
|
5867
5868
|
var prevEvent = activeEvent.prevEvent;
|
|
5868
|
-
var velocity = this._isOverThreshold ? this._getOffset([Math.abs(prevEvent.velocityX) * prevEvent.
|
|
5869
|
+
var velocity = this._isOverThreshold ? 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)]) : [0, 0];
|
|
5869
5870
|
activeEvent.onRelease();
|
|
5870
5871
|
this._observer.release(this, prevEvent, velocity);
|
|
5871
5872
|
};
|
|
@@ -6985,8 +6986,8 @@ version: 4.14.2-beta.0
|
|
|
6985
6986
|
});
|
|
6986
6987
|
};
|
|
6987
6988
|
/**
|
|
6988
|
-
*
|
|
6989
|
-
* @
|
|
6989
|
+
* Returns the current axes position
|
|
6990
|
+
* @ko 현재 axes의 position을 반환합니다.
|
|
6990
6991
|
*/
|
|
6991
6992
|
__proto.getCurrentPosition = function () {
|
|
6992
6993
|
var _a, _b;
|
|
@@ -7334,7 +7335,7 @@ version: 4.14.2-beta.0
|
|
|
7334
7335
|
return __generator(this, function (_b) {
|
|
7335
7336
|
flicking = getFlickingAttached(this._flicking);
|
|
7336
7337
|
nextDuration = duration;
|
|
7337
|
-
if (Math.abs(nextDuration - position) <
|
|
7338
|
+
if (Math.abs(nextDuration - position) < flicking.animationThreshold) {
|
|
7338
7339
|
nextDuration = 0;
|
|
7339
7340
|
}
|
|
7340
7341
|
animate = function () {
|
|
@@ -7368,6 +7369,7 @@ version: 4.14.2-beta.0
|
|
|
7368
7369
|
});
|
|
7369
7370
|
});
|
|
7370
7371
|
};
|
|
7372
|
+
|
|
7371
7373
|
__proto._getPosition = function (panel, direction) {
|
|
7372
7374
|
if (direction === void 0) {
|
|
7373
7375
|
direction = DIRECTION.NONE;
|
|
@@ -9202,7 +9204,7 @@ version: 4.14.2-beta.0
|
|
|
9202
9204
|
license: MIT
|
|
9203
9205
|
author: NAVER Corp.
|
|
9204
9206
|
repository: https://github.com/naver/egjs-imready
|
|
9205
|
-
version: 1.4.
|
|
9207
|
+
version: 1.4.1
|
|
9206
9208
|
*/
|
|
9207
9209
|
|
|
9208
9210
|
/******************************************************************************
|
|
@@ -9400,7 +9402,9 @@ version: 4.14.2-beta.0
|
|
|
9400
9402
|
// I'm not ready
|
|
9401
9403
|
return;
|
|
9402
9404
|
}
|
|
9403
|
-
|
|
9405
|
+
// I'm pre-ready and ready!
|
|
9406
|
+
var withPreReady = !_this.hasDataSize && !_this.hasLoading;
|
|
9407
|
+
_this.onReady(withPreReady);
|
|
9404
9408
|
};
|
|
9405
9409
|
_this.options = __assign({
|
|
9406
9410
|
prefix: "data-"
|
|
@@ -9416,7 +9420,7 @@ version: 4.14.2-beta.0
|
|
|
9416
9420
|
__proto.check = function () {
|
|
9417
9421
|
if (this.isSkip || !this.checkElement()) {
|
|
9418
9422
|
// I'm Ready
|
|
9419
|
-
this.onAlreadyReady();
|
|
9423
|
+
this.onAlreadyReady(true);
|
|
9420
9424
|
return false;
|
|
9421
9425
|
}
|
|
9422
9426
|
if (this.hasDataSize) {
|
|
@@ -9462,7 +9466,6 @@ version: 4.14.2-beta.0
|
|
|
9462
9466
|
});
|
|
9463
9467
|
};
|
|
9464
9468
|
__proto.onPreReady = function () {
|
|
9465
|
-
// 이전에 호출되었거나 ready가 발생했다면 preReady를 발생하지 않는다.
|
|
9466
9469
|
if (this.isPreReady) {
|
|
9467
9470
|
return;
|
|
9468
9471
|
}
|
|
@@ -9473,18 +9476,19 @@ version: 4.14.2-beta.0
|
|
|
9473
9476
|
isSkip: this.isSkip
|
|
9474
9477
|
});
|
|
9475
9478
|
};
|
|
9476
|
-
__proto.onReady = function () {
|
|
9477
|
-
var isPreReady = this.isPreReady;
|
|
9478
|
-
this.isPreReady = true;
|
|
9479
|
+
__proto.onReady = function (withPreReady) {
|
|
9479
9480
|
if (this.isReady) {
|
|
9480
9481
|
return;
|
|
9481
9482
|
}
|
|
9483
|
+
withPreReady = !this.isPreReady && withPreReady;
|
|
9484
|
+
if (withPreReady) {
|
|
9485
|
+
this.isPreReady = true;
|
|
9486
|
+
}
|
|
9482
9487
|
this.removeAutoSizer();
|
|
9483
9488
|
this.isReady = true;
|
|
9484
|
-
// preReady가 호출이 되지 않았으면 ready 이벤트만 발생하고 대신 withPreReady가 활성화
|
|
9485
9489
|
this.trigger("ready", {
|
|
9486
9490
|
element: this.element,
|
|
9487
|
-
withPreReady:
|
|
9491
|
+
withPreReady: withPreReady,
|
|
9488
9492
|
hasLoading: this.hasLoading,
|
|
9489
9493
|
isSkip: this.isSkip
|
|
9490
9494
|
});
|
|
@@ -9501,10 +9505,10 @@ version: 4.14.2-beta.0
|
|
|
9501
9505
|
_this.onPreReady();
|
|
9502
9506
|
});
|
|
9503
9507
|
};
|
|
9504
|
-
__proto.onAlreadyReady = function () {
|
|
9508
|
+
__proto.onAlreadyReady = function (withPreReady) {
|
|
9505
9509
|
var _this = this;
|
|
9506
9510
|
setTimeout(function () {
|
|
9507
|
-
_this.onReady();
|
|
9511
|
+
_this.onReady(withPreReady);
|
|
9508
9512
|
});
|
|
9509
9513
|
};
|
|
9510
9514
|
Loader.EVENTS = [];
|
|
@@ -9523,7 +9527,7 @@ version: 4.14.2-beta.0
|
|
|
9523
9527
|
__proto.check = function () {
|
|
9524
9528
|
if (this.isSkip) {
|
|
9525
9529
|
// I'm Ready
|
|
9526
|
-
this.onAlreadyReady();
|
|
9530
|
+
this.onAlreadyReady(true);
|
|
9527
9531
|
return false;
|
|
9528
9532
|
}
|
|
9529
9533
|
if (this.hasDataSize) {
|
|
@@ -9730,17 +9734,18 @@ version: 4.14.2-beta.0
|
|
|
9730
9734
|
loader.setHasLoading(children.some(function (el) {
|
|
9731
9735
|
return hasLoadingAttribute(el, prefix);
|
|
9732
9736
|
}));
|
|
9737
|
+
var withPreReady = false;
|
|
9733
9738
|
var childrenImReady = this.clone().on("error", function (e) {
|
|
9734
9739
|
loader.onError(e.target);
|
|
9735
9740
|
}).on("ready", function () {
|
|
9736
|
-
loader.onReady();
|
|
9741
|
+
loader.onReady(withPreReady);
|
|
9737
9742
|
});
|
|
9738
9743
|
loader.on("requestChildren", function () {
|
|
9739
9744
|
// has not data size
|
|
9740
9745
|
var contentElements = getContentElements(element, tags, _this.options.prefix);
|
|
9741
9746
|
childrenImReady.check(contentElements).on("preReady", function (e) {
|
|
9742
|
-
|
|
9743
|
-
|
|
9747
|
+
withPreReady = e.isReady;
|
|
9748
|
+
if (!withPreReady) {
|
|
9744
9749
|
loader.onPreReady();
|
|
9745
9750
|
}
|
|
9746
9751
|
});
|
|
@@ -10194,6 +10199,17 @@ version: 4.14.2-beta.0
|
|
|
10194
10199
|
});
|
|
10195
10200
|
return Promise.resolve();
|
|
10196
10201
|
};
|
|
10202
|
+
/**
|
|
10203
|
+
* Return Rendered Panels
|
|
10204
|
+
* @ko 렌더링이 된 패널을 반환합니다.
|
|
10205
|
+
* @return {Panel[]}
|
|
10206
|
+
*/
|
|
10207
|
+
__proto.getRenderedPanels = function () {
|
|
10208
|
+
var flicking = getFlickingAttached(this._flicking);
|
|
10209
|
+
return flicking.renderer.panels.filter(function (panel) {
|
|
10210
|
+
return panel.rendered;
|
|
10211
|
+
});
|
|
10212
|
+
};
|
|
10197
10213
|
/**
|
|
10198
10214
|
* Update all panel sizes
|
|
10199
10215
|
* @ko 모든 패널의 크기를 업데이트합니다
|
|
@@ -10554,6 +10570,13 @@ version: 4.14.2-beta.0
|
|
|
10554
10570
|
__proto._afterRender = function () {
|
|
10555
10571
|
var flicking = getFlickingAttached(this._flicking);
|
|
10556
10572
|
flicking.camera.applyTransform();
|
|
10573
|
+
if (flicking.useCSSOrderProperty) {
|
|
10574
|
+
// useCSSOrderProperty를 사용하는 경우 DOM은 변화가 없지만 대신 CSS Order가 추가 된다.
|
|
10575
|
+
var panels_1 = flicking.panels;
|
|
10576
|
+
this._strategy.getRenderingIndexesByOrder(flicking).forEach(function (domIndex, index) {
|
|
10577
|
+
panels_1[domIndex].element.style.order = "" + index;
|
|
10578
|
+
});
|
|
10579
|
+
}
|
|
10557
10580
|
};
|
|
10558
10581
|
return Renderer;
|
|
10559
10582
|
}();
|
|
@@ -10582,6 +10605,7 @@ version: 4.14.2-beta.0
|
|
|
10582
10605
|
});
|
|
10583
10606
|
});
|
|
10584
10607
|
};
|
|
10608
|
+
|
|
10585
10609
|
__proto._collectPanels = function () {
|
|
10586
10610
|
var flicking = getFlickingAttached(this._flicking);
|
|
10587
10611
|
var camera = flicking.camera;
|
|
@@ -10595,7 +10619,15 @@ version: 4.14.2-beta.0
|
|
|
10595
10619
|
var flicking = getFlickingAttached(this._flicking);
|
|
10596
10620
|
var cameraEl = flicking.camera.element;
|
|
10597
10621
|
// We're using reversed panels here as last panel should be the last element of camera element
|
|
10598
|
-
var reversedElements =
|
|
10622
|
+
var reversedElements = [];
|
|
10623
|
+
if (flicking.useCSSOrderProperty) {
|
|
10624
|
+
// useCSSOrderProperty를 사용하는 경우 원본 그대로 렌더링
|
|
10625
|
+
reversedElements = this.getRenderedPanels().map(function (panel) {
|
|
10626
|
+
return panel.element;
|
|
10627
|
+
}).reverse();
|
|
10628
|
+
} else {
|
|
10629
|
+
reversedElements = this._strategy.getRenderingElementsByOrder(flicking).reverse();
|
|
10630
|
+
}
|
|
10599
10631
|
reversedElements.forEach(function (el, idx) {
|
|
10600
10632
|
var nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;
|
|
10601
10633
|
if (el.nextElementSibling !== nextEl) {
|
|
@@ -11672,7 +11704,11 @@ version: 4.14.2-beta.0
|
|
|
11672
11704
|
_15 = _b.renderExternal,
|
|
11673
11705
|
renderExternal = _15 === void 0 ? null : _15,
|
|
11674
11706
|
_16 = _b.optimizeSizeUpdate,
|
|
11675
|
-
optimizeSizeUpdate = _16 === void 0 ? false : _16
|
|
11707
|
+
optimizeSizeUpdate = _16 === void 0 ? false : _16,
|
|
11708
|
+
_17 = _b.animationThreshold,
|
|
11709
|
+
animationThreshold = _17 === void 0 ? 0.5 : _17,
|
|
11710
|
+
_18 = _b.useCSSOrderProperty,
|
|
11711
|
+
useCSSOrderProperty = _18 === void 0 ? false : _18;
|
|
11676
11712
|
var _this = _super.call(this) || this;
|
|
11677
11713
|
// Internal states
|
|
11678
11714
|
_this._initialized = false;
|
|
@@ -11718,6 +11754,8 @@ version: 4.14.2-beta.0
|
|
|
11718
11754
|
_this._externalRenderer = externalRenderer;
|
|
11719
11755
|
_this._renderExternal = renderExternal;
|
|
11720
11756
|
_this._optimizeSizeUpdate = optimizeSizeUpdate;
|
|
11757
|
+
_this._animationThreshold = animationThreshold;
|
|
11758
|
+
_this._useCSSOrderProperty = useCSSOrderProperty;
|
|
11721
11759
|
// Create core components
|
|
11722
11760
|
_this._viewport = new Viewport(_this, getElement(root));
|
|
11723
11761
|
_this._autoResizer = new AutoResizer(_this);
|
|
@@ -12429,6 +12467,43 @@ version: 4.14.2-beta.0
|
|
|
12429
12467
|
enumerable: false,
|
|
12430
12468
|
configurable: true
|
|
12431
12469
|
});
|
|
12470
|
+
Object.defineProperty(__proto, "animationThreshold", {
|
|
12471
|
+
/**
|
|
12472
|
+
* The minimum distance for animation to proceed. If the distance to be moved is less than `animationThreshold`, the movement proceeds immediately without animation (duration: 0).
|
|
12473
|
+
* @ko animation이 진행되기 위한 최소한의 거리. 이동하려는 거리가 `animationThreshold`보다 적으면 애니메이션 없이(duration: 0) 즉시 이동한다.
|
|
12474
|
+
* @type {number}
|
|
12475
|
+
* @default 0.5
|
|
12476
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#animationThreshold animationThreshold ( Options )}
|
|
12477
|
+
*/
|
|
12478
|
+
get: function () {
|
|
12479
|
+
return this._animationThreshold;
|
|
12480
|
+
},
|
|
12481
|
+
set: function (val) {
|
|
12482
|
+
this._animationThreshold = val;
|
|
12483
|
+
},
|
|
12484
|
+
enumerable: false,
|
|
12485
|
+
configurable: true
|
|
12486
|
+
});
|
|
12487
|
+
Object.defineProperty(__proto, "useCSSOrderProperty", {
|
|
12488
|
+
/**
|
|
12489
|
+
* When `circular` is used, the DOM order changes depending on the position. Using `useCSSOrderProperty` does not change the DOM order, but the `order` CSS property changes the order on the screen.
|
|
12490
|
+
* When using `iframe`, you can prevent reloading when the DOM order changes.
|
|
12491
|
+
* @ko `circular`를 사용한 경우 위치에 따라 DOM의 순서가 변경된다. `useCSSOrderProperty`를 사용하면 DOM의 순서는 변경되지 않지만 `order` css가 설정되면서 화면상 순서가 바뀐다.
|
|
12492
|
+
* `iframe`을 사용하는 경우 DOM의 순서가 변경되면서 reload가 되는 것을 막을 수 있다.
|
|
12493
|
+
* @type {boolean}
|
|
12494
|
+
* @requires `circular`
|
|
12495
|
+
* @default false
|
|
12496
|
+
* @see {@link https://naver.github.io/egjs-flicking/Options#useCSSOrderProperty animationThreshold ( Options )}
|
|
12497
|
+
*/
|
|
12498
|
+
get: function () {
|
|
12499
|
+
return this._useCSSOrderProperty;
|
|
12500
|
+
},
|
|
12501
|
+
set: function (val) {
|
|
12502
|
+
this._useCSSOrderProperty = val;
|
|
12503
|
+
},
|
|
12504
|
+
enumerable: false,
|
|
12505
|
+
configurable: true
|
|
12506
|
+
});
|
|
12432
12507
|
Object.defineProperty(__proto, "interruptable", {
|
|
12433
12508
|
/**
|
|
12434
12509
|
* Set animation to be interruptable by click/touch.
|
|
@@ -13317,6 +13392,7 @@ version: 4.14.2-beta.0
|
|
|
13317
13392
|
if (!this._initialized) {
|
|
13318
13393
|
return [2 /*return*/];
|
|
13319
13394
|
}
|
|
13395
|
+
|
|
13320
13396
|
renderer.updatePanelSize();
|
|
13321
13397
|
camera.updateAlignPos();
|
|
13322
13398
|
camera.updateRange();
|
|
@@ -13330,6 +13406,7 @@ version: 4.14.2-beta.0
|
|
|
13330
13406
|
if (!this._initialized) {
|
|
13331
13407
|
return [2 /*return*/];
|
|
13332
13408
|
}
|
|
13409
|
+
|
|
13333
13410
|
if (control.animating) ; else {
|
|
13334
13411
|
control.updatePosition(prevProgressInPanel);
|
|
13335
13412
|
control.updateInput();
|
|
@@ -13567,7 +13644,7 @@ version: 4.14.2-beta.0
|
|
|
13567
13644
|
* Flicking.VERSION; // ex) 4.0.0
|
|
13568
13645
|
* ```
|
|
13569
13646
|
*/
|
|
13570
|
-
Flicking.VERSION = "4.14.2-beta.
|
|
13647
|
+
Flicking.VERSION = "4.14.2-beta.1";
|
|
13571
13648
|
return Flicking;
|
|
13572
13649
|
}(Component);
|
|
13573
13650
|
|
|
@@ -14106,13 +14183,16 @@ version: 4.14.2-beta.0
|
|
|
14106
14183
|
map[prev] = current;
|
|
14107
14184
|
return map;
|
|
14108
14185
|
}, {});
|
|
14109
|
-
|
|
14186
|
+
var renderingPanels = flicking.panels.filter(function (panel) {
|
|
14110
14187
|
return !removedPanels[panel.index];
|
|
14111
|
-
})
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14188
|
+
});
|
|
14189
|
+
if (!flicking.useCSSOrderProperty) {
|
|
14190
|
+
// useCSSOrderProperty를 사용하게 되는 경우 sort를 하지 않는다.
|
|
14191
|
+
renderingPanels.sort(function (panel1, panel2) {
|
|
14192
|
+
return panel1.position + panel1.offset - (panel2.position + panel2.offset);
|
|
14193
|
+
});
|
|
14194
|
+
}
|
|
14195
|
+
return __spread$1(renderingPanels.map(function (panel) {
|
|
14116
14196
|
return diffResult.list[maintainedMap[panel.index]];
|
|
14117
14197
|
}), diffResult.added.map(function (idx) {
|
|
14118
14198
|
return diffResult.list[idx];
|