@egjs/flicking 4.11.5-beta.1 → 4.11.5-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/declaration/Flicking.d.ts +0 -2
- package/declaration/camera/Camera.d.ts +1 -0
- package/declaration/core/AutoResizer.d.ts +0 -1
- package/dist/flicking.cjs.js +19 -49
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +19 -49
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +19 -49
- 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 +29 -66
- 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 +1 -12
- package/src/camera/Camera.ts +10 -1
- package/src/core/AutoResizer.ts +1 -16
- package/src/renderer/Renderer.ts +0 -6
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.11.5-beta.
|
|
7
|
+
version: 4.11.5-beta.3
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -12,7 +12,7 @@ version: 4.11.5-beta.1
|
|
|
12
12
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory());
|
|
13
13
|
})(this, (function () { 'use strict';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/*! *****************************************************************************
|
|
16
16
|
Copyright (c) Microsoft Corporation.
|
|
17
17
|
|
|
18
18
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -26,7 +26,7 @@ version: 4.11.5-beta.1
|
|
|
26
26
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
27
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
28
|
***************************************************************************** */
|
|
29
|
-
/* global Reflect, Promise
|
|
29
|
+
/* global Reflect, Promise */
|
|
30
30
|
|
|
31
31
|
var extendStatics$3 = function (d, b) {
|
|
32
32
|
extendStatics$3 = Object.setPrototypeOf || {
|
|
@@ -111,7 +111,7 @@ version: 4.11.5-beta.1
|
|
|
111
111
|
}
|
|
112
112
|
function step(op) {
|
|
113
113
|
if (f) throw new TypeError("Generator is already executing.");
|
|
114
|
-
while (
|
|
114
|
+
while (_) try {
|
|
115
115
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
116
116
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
117
117
|
switch (op[0]) {
|
|
@@ -215,10 +215,6 @@ version: 4.11.5-beta.1
|
|
|
215
215
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$1(arguments[i]));
|
|
216
216
|
return ar;
|
|
217
217
|
}
|
|
218
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
219
|
-
var e = new Error(message);
|
|
220
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
221
|
-
};
|
|
222
218
|
|
|
223
219
|
/*
|
|
224
220
|
Copyright (c) NAVER Corp.
|
|
@@ -1362,10 +1358,6 @@ version: 4.11.5-beta.1
|
|
|
1362
1358
|
return Viewport;
|
|
1363
1359
|
}();
|
|
1364
1360
|
|
|
1365
|
-
/**
|
|
1366
|
-
* A component that detects size change and trigger resize method when the autoResize option is used
|
|
1367
|
-
* @ko autoResize 옵션을 사용할 때 크기 변화를 감지하고 Flicking의 resize를 호출하는 컴포넌트
|
|
1368
|
-
*/
|
|
1369
1361
|
var AutoResizer = /*#__PURE__*/function () {
|
|
1370
1362
|
function AutoResizer(flicking) {
|
|
1371
1363
|
var _this = this;
|
|
@@ -1428,13 +1420,9 @@ version: 4.11.5-beta.1
|
|
|
1428
1420
|
}
|
|
1429
1421
|
if (flicking.useResizeObserver && !!window.ResizeObserver) {
|
|
1430
1422
|
var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;
|
|
1431
|
-
var
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
})).forEach(function (element) {
|
|
1435
|
-
resizeObserver_1.observe(element);
|
|
1436
|
-
});
|
|
1437
|
-
this._resizeObserver = resizeObserver_1;
|
|
1423
|
+
var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize);
|
|
1424
|
+
resizeObserver.observe(flicking.viewport.element);
|
|
1425
|
+
this._resizeObserver = resizeObserver;
|
|
1438
1426
|
} else {
|
|
1439
1427
|
window.addEventListener("resize", this._onResize);
|
|
1440
1428
|
}
|
|
@@ -1453,12 +1441,6 @@ version: 4.11.5-beta.1
|
|
|
1453
1441
|
this._enabled = false;
|
|
1454
1442
|
return this;
|
|
1455
1443
|
};
|
|
1456
|
-
__proto.observe = function (element) {
|
|
1457
|
-
if (this._resizeObserver) {
|
|
1458
|
-
this._resizeObserver.observe(element);
|
|
1459
|
-
}
|
|
1460
|
-
return this;
|
|
1461
|
-
};
|
|
1462
1444
|
return AutoResizer;
|
|
1463
1445
|
}();
|
|
1464
1446
|
|
|
@@ -2673,7 +2655,7 @@ version: 4.11.5-beta.1
|
|
|
2673
2655
|
license: MIT
|
|
2674
2656
|
author: NAVER Corp.
|
|
2675
2657
|
repository: https://github.com/naver/egjs-axes
|
|
2676
|
-
version: 3.9.
|
|
2658
|
+
version: 3.9.0
|
|
2677
2659
|
*/
|
|
2678
2660
|
|
|
2679
2661
|
/*! *****************************************************************************
|
|
@@ -3011,9 +2993,6 @@ version: 4.11.5-beta.1
|
|
|
3011
2993
|
});
|
|
3012
2994
|
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
3013
2995
|
oldCssProps[prop] = element.style[prop];
|
|
3014
|
-
});
|
|
3015
|
-
// Old style props like user-select can be corrupted if you change the style directly in the logic above.
|
|
3016
|
-
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
3017
2996
|
element.style[prop] = newCssProps_1[prop];
|
|
3018
2997
|
});
|
|
3019
2998
|
}
|
|
@@ -5081,7 +5060,7 @@ version: 4.11.5-beta.1
|
|
|
5081
5060
|
* eg.Axes.VERSION; // ex) 3.3.3
|
|
5082
5061
|
* ```
|
|
5083
5062
|
*/
|
|
5084
|
-
Axes.VERSION = "3.9.
|
|
5063
|
+
Axes.VERSION = "3.9.0";
|
|
5085
5064
|
/* eslint-enable */
|
|
5086
5065
|
/**
|
|
5087
5066
|
* @name TRANSFORM
|
|
@@ -5276,11 +5255,15 @@ version: 4.11.5-beta.1
|
|
|
5276
5255
|
this._detachWindowEvent(this._activeEvent);
|
|
5277
5256
|
}
|
|
5278
5257
|
this._attachElementEvent(observer);
|
|
5258
|
+
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5279
5259
|
return this;
|
|
5280
5260
|
};
|
|
5281
5261
|
__proto.disconnect = function () {
|
|
5282
5262
|
this._detachElementEvent();
|
|
5283
5263
|
this._detachWindowEvent(this._activeEvent);
|
|
5264
|
+
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5265
|
+
revertCssProps(this.element, this._originalCssProps);
|
|
5266
|
+
}
|
|
5284
5267
|
this._direction = DIRECTION_NONE;
|
|
5285
5268
|
return this;
|
|
5286
5269
|
};
|
|
@@ -5298,10 +5281,7 @@ version: 4.11.5-beta.1
|
|
|
5298
5281
|
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5299
5282
|
*/
|
|
5300
5283
|
__proto.enable = function () {
|
|
5301
|
-
|
|
5302
|
-
this._enabled = true;
|
|
5303
|
-
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5304
|
-
}
|
|
5284
|
+
this._enabled = true;
|
|
5305
5285
|
return this;
|
|
5306
5286
|
};
|
|
5307
5287
|
/**
|
|
@@ -5310,12 +5290,7 @@ version: 4.11.5-beta.1
|
|
|
5310
5290
|
* @return {PanInput} An instance of a module itself <ko>모듈 자신의 인스턴스</ko>
|
|
5311
5291
|
*/
|
|
5312
5292
|
__proto.disable = function () {
|
|
5313
|
-
|
|
5314
|
-
this._enabled = false;
|
|
5315
|
-
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5316
|
-
revertCssProps(this.element, this._originalCssProps);
|
|
5317
|
-
}
|
|
5318
|
-
}
|
|
5293
|
+
this._enabled = false;
|
|
5319
5294
|
return this;
|
|
5320
5295
|
};
|
|
5321
5296
|
/**
|
|
@@ -5472,7 +5447,7 @@ version: 4.11.5-beta.1
|
|
|
5472
5447
|
throw new Error("Element to connect input does not exist.");
|
|
5473
5448
|
}
|
|
5474
5449
|
this._observer = observer;
|
|
5475
|
-
this.
|
|
5450
|
+
this._enabled = true;
|
|
5476
5451
|
this._activeEvent = activeEvent;
|
|
5477
5452
|
element.addEventListener("click", this._preventClickWhenDragged, true);
|
|
5478
5453
|
activeEvent.start.forEach(function (event) {
|
|
@@ -5496,7 +5471,7 @@ version: 4.11.5-beta.1
|
|
|
5496
5471
|
element.removeEventListener(event, _this._voidFunction);
|
|
5497
5472
|
});
|
|
5498
5473
|
}
|
|
5499
|
-
this.
|
|
5474
|
+
this._enabled = false;
|
|
5500
5475
|
this._observer = null;
|
|
5501
5476
|
};
|
|
5502
5477
|
return PanInput;
|
|
@@ -7958,6 +7933,7 @@ version: 4.11.5-beta.1
|
|
|
7958
7933
|
var _this = this;
|
|
7959
7934
|
var _b = (_a === void 0 ? {} : _a).align,
|
|
7960
7935
|
align = _b === void 0 ? ALIGN.CENTER : _b;
|
|
7936
|
+
this._lookedOffset = 0;
|
|
7961
7937
|
this._checkTranslateSupport = function () {
|
|
7962
7938
|
var e_1, _a;
|
|
7963
7939
|
var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"];
|
|
@@ -8317,6 +8293,8 @@ version: 4.11.5-beta.1
|
|
|
8317
8293
|
*/
|
|
8318
8294
|
__proto.lookAt = function (pos) {
|
|
8319
8295
|
var _this = this;
|
|
8296
|
+
var prevOffset = this._offset;
|
|
8297
|
+
var isChangedOffset = this._lookedOffset !== prevOffset;
|
|
8320
8298
|
var flicking = getFlickingAttached(this._flicking);
|
|
8321
8299
|
var prevPos = this._position;
|
|
8322
8300
|
this._position = pos;
|
|
@@ -8324,10 +8302,15 @@ version: 4.11.5-beta.1
|
|
|
8324
8302
|
this._refreshVisiblePanels();
|
|
8325
8303
|
this._checkNeedPanel();
|
|
8326
8304
|
this._checkReachEnd(prevPos, pos);
|
|
8327
|
-
if (toggled) {
|
|
8305
|
+
if (isChangedOffset || toggled) {
|
|
8328
8306
|
void flicking.renderer.render().then(function () {
|
|
8329
8307
|
_this.updateOffset();
|
|
8308
|
+
_this._lookedOffset = _this._offset;
|
|
8330
8309
|
});
|
|
8310
|
+
} else if (isChangedOffset) {
|
|
8311
|
+
// sync offset for renderOnlyVisible on resize
|
|
8312
|
+
this.updateOffset();
|
|
8313
|
+
this._lookedOffset = this._offset;
|
|
8331
8314
|
} else {
|
|
8332
8315
|
this.applyTransform();
|
|
8333
8316
|
}
|
|
@@ -8586,6 +8569,7 @@ version: 4.11.5-beta.1
|
|
|
8586
8569
|
};
|
|
8587
8570
|
__proto._resetInternalValues = function () {
|
|
8588
8571
|
this._position = 0;
|
|
8572
|
+
this._lookedOffset = 0;
|
|
8589
8573
|
this._alignPos = 0;
|
|
8590
8574
|
this._offset = 0;
|
|
8591
8575
|
this._circularOffset = 0;
|
|
@@ -9894,11 +9878,6 @@ version: 4.11.5-beta.1
|
|
|
9894
9878
|
var activePanel = control.activePanel;
|
|
9895
9879
|
// Update camera & control
|
|
9896
9880
|
this._updateCameraAndControl();
|
|
9897
|
-
if (flicking.autoResize && flicking.useResizeObserver) {
|
|
9898
|
-
panelsAdded.forEach(function (panel) {
|
|
9899
|
-
flicking.autoResizer.observe(panel.element);
|
|
9900
|
-
});
|
|
9901
|
-
}
|
|
9902
9881
|
void this.render();
|
|
9903
9882
|
if (!flicking.animating) {
|
|
9904
9883
|
if (!activePanel || activePanel.removed) {
|
|
@@ -11314,19 +11293,6 @@ version: 4.11.5-beta.1
|
|
|
11314
11293
|
enumerable: false,
|
|
11315
11294
|
configurable: true
|
|
11316
11295
|
});
|
|
11317
|
-
Object.defineProperty(__proto, "autoResizer", {
|
|
11318
|
-
/**
|
|
11319
|
-
* {@link AutoResizer} instance of the Flicking
|
|
11320
|
-
* @ko 현재 Flicking에 활성화된 {@link AutoResizer} 인스턴스
|
|
11321
|
-
* @internal
|
|
11322
|
-
* @readonly
|
|
11323
|
-
*/
|
|
11324
|
-
get: function () {
|
|
11325
|
-
return this._autoResizer;
|
|
11326
|
-
},
|
|
11327
|
-
enumerable: false,
|
|
11328
|
-
configurable: true
|
|
11329
|
-
});
|
|
11330
11296
|
Object.defineProperty(__proto, "initialized", {
|
|
11331
11297
|
// Internal States
|
|
11332
11298
|
/**
|
|
@@ -12179,9 +12145,6 @@ version: 4.11.5-beta.1
|
|
|
12179
12145
|
// OTHERS
|
|
12180
12146
|
set: function (val) {
|
|
12181
12147
|
this._autoResize = val;
|
|
12182
|
-
if (!this._initialized) {
|
|
12183
|
-
return;
|
|
12184
|
-
}
|
|
12185
12148
|
if (val) {
|
|
12186
12149
|
this._autoResizer.enable();
|
|
12187
12150
|
} else {
|
|
@@ -12204,7 +12167,7 @@ version: 4.11.5-beta.1
|
|
|
12204
12167
|
},
|
|
12205
12168
|
set: function (val) {
|
|
12206
12169
|
this._useResizeObserver = val;
|
|
12207
|
-
if (this.
|
|
12170
|
+
if (this._autoResize) {
|
|
12208
12171
|
this._autoResizer.enable();
|
|
12209
12172
|
}
|
|
12210
12173
|
},
|
|
@@ -13001,7 +12964,7 @@ version: 4.11.5-beta.1
|
|
|
13001
12964
|
* Flicking.VERSION; // ex) 4.0.0
|
|
13002
12965
|
* ```
|
|
13003
12966
|
*/
|
|
13004
|
-
Flicking.VERSION = "4.11.5-beta.
|
|
12967
|
+
Flicking.VERSION = "4.11.5-beta.3";
|
|
13005
12968
|
return Flicking;
|
|
13006
12969
|
}(Component);
|
|
13007
12970
|
|