@@ -21,7 +21,7 @@ export default function (Glide, Components, Events) {
21
21
let swipeStartX = 0
22
22
let swipeStartY = 0
23
23
let disabled = false
24
- let capture = ( supportsPassive ) ? { passive : true } : false
24
+ const capture = ( supportsPassive ) ? { passive : true } : false
25
25
26
26
const Swipe = {
27
27
/**
@@ -43,7 +43,7 @@ export default function (Glide, Components, Events) {
43
43
if ( ! disabled && ! Glide . disabled ) {
44
44
this . disable ( )
45
45
46
- let swipe = this . touches ( event )
46
+ const swipe = this . touches ( event )
47
47
48
48
swipeSin = null
49
49
swipeStartX = toInt ( swipe . pageX )
@@ -65,14 +65,14 @@ export default function (Glide, Components, Events) {
65
65
if ( ! Glide . disabled ) {
66
66
const { touchAngle, touchRatio, classes } = Glide . settings
67
67
68
- let swipe = this . touches ( event )
68
+ const swipe = this . touches ( event )
69
69
70
- let subExSx = toInt ( swipe . pageX ) - swipeStartX
71
- let subEySy = toInt ( swipe . pageY ) - swipeStartY
72
- let powEX = Math . abs ( subExSx << 2 )
73
- let powEY = Math . abs ( subEySy << 2 )
74
- let swipeHypotenuse = Math . sqrt ( powEX + powEY )
75
- let swipeCathetus = Math . sqrt ( powEY )
70
+ const subExSx = toInt ( swipe . pageX ) - swipeStartX
71
+ const subEySy = toInt ( swipe . pageY ) - swipeStartY
72
+ const powEX = Math . abs ( subExSx << 2 )
73
+ const powEY = Math . abs ( subEySy << 2 )
74
+ const swipeHypotenuse = Math . sqrt ( powEX + powEY )
75
+ const swipeCathetus = Math . sqrt ( powEY )
76
76
77
77
swipeSin = Math . asin ( swipeCathetus / swipeHypotenuse )
78
78
@@ -100,11 +100,11 @@ export default function (Glide, Components, Events) {
100
100
if ( ! Glide . disabled ) {
101
101
const { perSwipe, touchAngle, classes } = Glide . settings
102
102
103
- let swipe = this . touches ( event )
104
- let threshold = this . threshold ( event )
103
+ const swipe = this . touches ( event )
104
+ const threshold = this . threshold ( event )
105
105
106
- let swipeDistance = swipe . pageX - swipeStartX
107
- let swipeDeg = swipeSin * 180 / Math . PI
106
+ const swipeDistance = swipe . pageX - swipeStartX
107
+ const swipeDeg = swipeSin * 180 / Math . PI
108
108
109
109
this . enable ( )
110
110
@@ -216,7 +216,7 @@ export default function (Glide, Components, Events) {
216
216
* @return {Number }
217
217
*/
218
218
threshold ( event ) {
219
- let settings = Glide . settings
219
+ const settings = Glide . settings
220
220
221
221
if ( MOUSE_EVENTS . indexOf ( event . type ) > - 1 ) {
222
222
return settings . dragThreshold
0 commit comments