@egjs/flicking 4.7.0 → 4.7.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/README.md +1 -1
- package/dist/flicking.esm.js +3 -3
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +3 -3
- 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 +56 -29
- 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/renderer/Renderer.ts +1 -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.7.
|
|
7
|
+
version: 4.7.1
|
|
8
8
|
*/
|
|
9
9
|
(function (global, factory) {
|
|
10
10
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -2281,7 +2281,7 @@ version: 4.7.0
|
|
|
2281
2281
|
license: MIT
|
|
2282
2282
|
author: NAVER Corp.
|
|
2283
2283
|
repository: https://github.com/naver/egjs-axes
|
|
2284
|
-
version: 3.
|
|
2284
|
+
version: 3.2.0
|
|
2285
2285
|
*/
|
|
2286
2286
|
|
|
2287
2287
|
/*! *****************************************************************************
|
|
@@ -2379,8 +2379,7 @@ version: 4.7.0
|
|
|
2379
2379
|
|
|
2380
2380
|
return "";
|
|
2381
2381
|
}();
|
|
2382
|
-
var
|
|
2383
|
-
"touch-action": "none",
|
|
2382
|
+
var PREVENT_DRAG_CSSPROPS = {
|
|
2384
2383
|
"user-select": "none",
|
|
2385
2384
|
"-webkit-user-drag": "none"
|
|
2386
2385
|
};
|
|
@@ -2590,11 +2589,28 @@ version: 4.7.0
|
|
|
2590
2589
|
var getAngle = function (posX, posY) {
|
|
2591
2590
|
return Math.atan2(posY, posX) * 180 / Math.PI;
|
|
2592
2591
|
};
|
|
2593
|
-
var
|
|
2592
|
+
var isCssPropsFromAxes = function (originalCssProps) {
|
|
2593
|
+
var same = true;
|
|
2594
|
+
Object.keys(PREVENT_DRAG_CSSPROPS).forEach(function (prop) {
|
|
2595
|
+
if (!originalCssProps || originalCssProps[prop] !== PREVENT_DRAG_CSSPROPS[prop]) {
|
|
2596
|
+
same = false;
|
|
2597
|
+
}
|
|
2598
|
+
});
|
|
2599
|
+
return same;
|
|
2600
|
+
};
|
|
2601
|
+
var setCssProps = function (element, option, direction) {
|
|
2602
|
+
var _a;
|
|
2603
|
+
|
|
2604
|
+
var touchActionMap = (_a = {}, _a[DIRECTION_NONE] = "auto", _a[DIRECTION_ALL] = "none", _a[DIRECTION_VERTICAL] = "pan-x", _a[DIRECTION_HORIZONTAL] = "pan-y", _a);
|
|
2594
2605
|
var oldCssProps = {};
|
|
2595
2606
|
|
|
2596
2607
|
if (element && element.style) {
|
|
2597
|
-
var
|
|
2608
|
+
var touchAction = option.touchAction ? option.touchAction : touchActionMap[direction];
|
|
2609
|
+
|
|
2610
|
+
var newCssProps_1 = __assign$1(__assign$1({}, PREVENT_DRAG_CSSPROPS), {
|
|
2611
|
+
"touch-action": element.style["touch-action"] === "none" ? "none" : touchAction
|
|
2612
|
+
});
|
|
2613
|
+
|
|
2598
2614
|
Object.keys(newCssProps_1).forEach(function (prop) {
|
|
2599
2615
|
oldCssProps[prop] = element.style[prop];
|
|
2600
2616
|
element.style[prop] = newCssProps_1[prop];
|
|
@@ -2603,6 +2619,15 @@ version: 4.7.0
|
|
|
2603
2619
|
|
|
2604
2620
|
return oldCssProps;
|
|
2605
2621
|
};
|
|
2622
|
+
var revertCssProps = function (element, originalCssProps) {
|
|
2623
|
+
if (element && element.style && originalCssProps) {
|
|
2624
|
+
Object.keys(originalCssProps).forEach(function (prop) {
|
|
2625
|
+
element.style[prop] = originalCssProps[prop];
|
|
2626
|
+
});
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
return;
|
|
2630
|
+
};
|
|
2606
2631
|
|
|
2607
2632
|
var EventManager =
|
|
2608
2633
|
/*#__PURE__*/
|
|
@@ -3354,8 +3379,8 @@ version: 4.7.0
|
|
|
3354
3379
|
__proto._getMovement = function (event) {
|
|
3355
3380
|
var prev = this.prevEvent.srcEvent;
|
|
3356
3381
|
return {
|
|
3357
|
-
x: event.
|
|
3358
|
-
y: event.
|
|
3382
|
+
x: event.clientX - prev.clientX,
|
|
3383
|
+
y: event.clientY - prev.clientY
|
|
3359
3384
|
};
|
|
3360
3385
|
};
|
|
3361
3386
|
|
|
@@ -3428,8 +3453,8 @@ version: 4.7.0
|
|
|
3428
3453
|
}
|
|
3429
3454
|
|
|
3430
3455
|
return {
|
|
3431
|
-
x: event.touches[0].
|
|
3432
|
-
y: event.touches[0].
|
|
3456
|
+
x: event.touches[0].clientX - prev.touches[0].clientX,
|
|
3457
|
+
y: event.touches[0].clientY - prev.touches[0].clientY
|
|
3433
3458
|
};
|
|
3434
3459
|
};
|
|
3435
3460
|
|
|
@@ -3520,8 +3545,8 @@ version: 4.7.0
|
|
|
3520
3545
|
}
|
|
3521
3546
|
|
|
3522
3547
|
return {
|
|
3523
|
-
x: event.
|
|
3524
|
-
y: event.
|
|
3548
|
+
x: event.clientX - prev.clientX,
|
|
3549
|
+
y: event.clientY - prev.clientY
|
|
3525
3550
|
};
|
|
3526
3551
|
};
|
|
3527
3552
|
|
|
@@ -3646,18 +3671,18 @@ version: 4.7.0
|
|
|
3646
3671
|
var prev = this.prevEvent.srcEvent;
|
|
3647
3672
|
|
|
3648
3673
|
var _a = [event, prev].map(function (e) {
|
|
3649
|
-
if (_this._isTouchEvent(
|
|
3674
|
+
if (_this._isTouchEvent(e)) {
|
|
3650
3675
|
return {
|
|
3651
3676
|
id: e.touches[0].identifier,
|
|
3652
|
-
x: e.touches[0].
|
|
3653
|
-
y: e.touches[0].
|
|
3677
|
+
x: e.touches[0].clientX,
|
|
3678
|
+
y: e.touches[0].clientY
|
|
3654
3679
|
};
|
|
3655
3680
|
}
|
|
3656
3681
|
|
|
3657
3682
|
return {
|
|
3658
3683
|
id: null,
|
|
3659
|
-
x: e.
|
|
3660
|
-
y: e.
|
|
3684
|
+
x: e.clientX,
|
|
3685
|
+
y: e.clientY
|
|
3661
3686
|
};
|
|
3662
3687
|
}),
|
|
3663
3688
|
nextSpot = _a[0],
|
|
@@ -4868,7 +4893,7 @@ version: 4.7.0
|
|
|
4868
4893
|
*/
|
|
4869
4894
|
|
|
4870
4895
|
|
|
4871
|
-
Axes.VERSION = "3.
|
|
4896
|
+
Axes.VERSION = "3.2.0";
|
|
4872
4897
|
/* eslint-enable */
|
|
4873
4898
|
|
|
4874
4899
|
/**
|
|
@@ -4962,11 +4987,13 @@ version: 4.7.0
|
|
|
4962
4987
|
/**
|
|
4963
4988
|
* @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module.
|
|
4964
4989
|
* @ko eg.Axes.PanInput 모듈의 옵션 객체
|
|
4965
|
-
* @param {String[]} [inputType=["touch","mouse", "pointer"]] Types of input devices
|
|
4990
|
+
* @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices
|
|
4966
4991
|
* - touch: Touch screen
|
|
4967
|
-
* - mouse: Mouse
|
|
4992
|
+
* - mouse: Mouse
|
|
4993
|
+
* - pointer: Mouse and touch <ko>입력 장치 종류
|
|
4968
4994
|
* - touch: 터치 입력 장치
|
|
4969
|
-
* - mouse:
|
|
4995
|
+
* - mouse: 마우스
|
|
4996
|
+
* - pointer: 마우스 및 터치</ko>
|
|
4970
4997
|
* @param {String[]} [inputButton=["left"]] List of buttons to allow input
|
|
4971
4998
|
* - left: Left mouse button and normal touch
|
|
4972
4999
|
* - middle: Mouse wheel press
|
|
@@ -4980,6 +5007,7 @@ version: 4.7.0
|
|
|
4980
5007
|
* @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) <ko>사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)</ko>
|
|
4981
5008
|
* @param {Number} [threshold=0] Minimal pan distance required before recognizing <ko>사용자의 Pan 동작을 인식하기 위해산 최소한의 거리</ko>
|
|
4982
5009
|
* @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>
|
|
5010
|
+
* @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>
|
|
4983
5011
|
**/
|
|
4984
5012
|
|
|
4985
5013
|
/**
|
|
@@ -5042,7 +5070,8 @@ version: 4.7.0
|
|
|
5042
5070
|
thresholdAngle: 45,
|
|
5043
5071
|
threshold: 0,
|
|
5044
5072
|
iOSEdgeSwipeThreshold: IOS_EDGE_THRESHOLD,
|
|
5045
|
-
releaseOnScroll: false
|
|
5073
|
+
releaseOnScroll: false,
|
|
5074
|
+
touchAction: null
|
|
5046
5075
|
}, options);
|
|
5047
5076
|
this._onPanstart = this._onPanstart.bind(this);
|
|
5048
5077
|
this._onPanmove = this._onPanmove.bind(this);
|
|
@@ -5077,7 +5106,7 @@ version: 4.7.0
|
|
|
5077
5106
|
|
|
5078
5107
|
this._attachElementEvent(observer);
|
|
5079
5108
|
|
|
5080
|
-
this._originalCssProps = setCssProps(this.element);
|
|
5109
|
+
this._originalCssProps = setCssProps(this.element, this.options, this._direction);
|
|
5081
5110
|
return this;
|
|
5082
5111
|
};
|
|
5083
5112
|
|
|
@@ -5086,8 +5115,8 @@ version: 4.7.0
|
|
|
5086
5115
|
|
|
5087
5116
|
this._detachWindowEvent(this._activeEvent);
|
|
5088
5117
|
|
|
5089
|
-
if (this._originalCssProps
|
|
5090
|
-
|
|
5118
|
+
if (!isCssPropsFromAxes(this._originalCssProps)) {
|
|
5119
|
+
revertCssProps(this.element, this._originalCssProps);
|
|
5091
5120
|
}
|
|
5092
5121
|
|
|
5093
5122
|
this._direction = DIRECTION_NONE;
|
|
@@ -5150,7 +5179,6 @@ version: 4.7.0
|
|
|
5150
5179
|
this._observer.hold(this, panEvent);
|
|
5151
5180
|
|
|
5152
5181
|
this._atRightEdge = IS_IOS_SAFARI && panEvent.center.x > window.innerWidth - edgeThreshold;
|
|
5153
|
-
console.log("onPanStart");
|
|
5154
5182
|
|
|
5155
5183
|
this._attachWindowEvent(activeEvent);
|
|
5156
5184
|
|
|
@@ -5242,7 +5270,6 @@ version: 4.7.0
|
|
|
5242
5270
|
var velocity = this._applyScale([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)]);
|
|
5243
5271
|
|
|
5244
5272
|
activeEvent.onRelease();
|
|
5245
|
-
console.log("onPanEnd");
|
|
5246
5273
|
|
|
5247
5274
|
this._observer.release(this, prevEvent, velocity);
|
|
5248
5275
|
};
|
|
@@ -10287,7 +10314,7 @@ version: 4.7.0
|
|
|
10287
10314
|
if (!resizeOnContentsReady || flicking.virtualEnabled) return;
|
|
10288
10315
|
|
|
10289
10316
|
var hasContents = function (panel) {
|
|
10290
|
-
return !!panel.element.querySelector("img, video");
|
|
10317
|
+
return panel.element && !!panel.element.querySelector("img, video");
|
|
10291
10318
|
};
|
|
10292
10319
|
|
|
10293
10320
|
checkingPanels = checkingPanels.filter(function (panel) {
|
|
@@ -13404,7 +13431,7 @@ version: 4.7.0
|
|
|
13404
13431
|
*/
|
|
13405
13432
|
|
|
13406
13433
|
|
|
13407
|
-
Flicking.VERSION = "4.7.
|
|
13434
|
+
Flicking.VERSION = "4.7.1";
|
|
13408
13435
|
return Flicking;
|
|
13409
13436
|
}(Component);
|
|
13410
13437
|
|