Skip to content

Commit e957e27

Browse files
chore(): Bump v3.2.7
1 parent 4fc497e commit e957e27

File tree

5 files changed

+84
-93
lines changed

5 files changed

+84
-93
lines changed

dist/glide.esm.js

+27-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Glide.js v3.2.6
2+
* Glide.js v3.2.7
33
* (c) 2013-2019 Jędrzej Chałubek <[email protected]> (http://jedrzejchalubek.com/)
44
* Released under the MIT License.
55
*/
@@ -2547,7 +2547,6 @@ function Swipe (Glide, Components, Events) {
25472547
var swipeStartX = 0;
25482548
var swipeStartY = 0;
25492549
var disabled = false;
2550-
var moveable = true;
25512550
var capture = supportsPassive$1 ? { passive: true } : false;
25522551

25532552
var Swipe = {
@@ -2573,7 +2572,6 @@ function Swipe (Glide, Components, Events) {
25732572

25742573
var swipe = this.touches(event);
25752574

2576-
moveable = true;
25772575
swipeSin = null;
25782576
swipeStartX = toInt(swipe.pageX);
25792577
swipeStartY = toInt(swipe.pageY);
@@ -2610,7 +2608,7 @@ function Swipe (Glide, Components, Events) {
26102608

26112609
swipeSin = Math.asin(swipeCathetus / swipeHypotenuse);
26122610

2613-
if (moveable && swipeSin * 180 / Math.PI < touchAngle) {
2611+
if (swipeSin * 180 / Math.PI < touchAngle) {
26142612
event.stopPropagation();
26152613

26162614
Components.Move.make(subExSx * toFloat(touchRatio));
@@ -2619,8 +2617,6 @@ function Swipe (Glide, Components, Events) {
26192617

26202618
Events.emit('swipe.move');
26212619
} else {
2622-
moveable = false;
2623-
26242620
return false;
26252621
}
26262622
}
@@ -2646,33 +2642,31 @@ function Swipe (Glide, Components, Events) {
26462642

26472643
this.enable();
26482644

2649-
if (moveable) {
2650-
if (swipeDistance > threshold && swipeDeg < settings.touchAngle) {
2651-
// While swipe is positive and greater than threshold move backward.
2652-
if (settings.perTouch) {
2653-
steps = Math.min(steps, toInt(settings.perTouch));
2654-
}
2655-
2656-
if (Components.Direction.is('rtl')) {
2657-
steps = -steps;
2658-
}
2645+
if (swipeDistance > threshold && swipeDeg < settings.touchAngle) {
2646+
// While swipe is positive and greater than threshold move backward.
2647+
if (settings.perTouch) {
2648+
steps = Math.min(steps, toInt(settings.perTouch));
2649+
}
26592650

2660-
Components.Run.make(Components.Direction.resolve('<' + steps));
2661-
} else if (swipeDistance < -threshold && swipeDeg < settings.touchAngle) {
2662-
// While swipe is negative and lower than negative threshold move forward.
2663-
if (settings.perTouch) {
2664-
steps = Math.max(steps, -toInt(settings.perTouch));
2665-
}
2651+
if (Components.Direction.is('rtl')) {
2652+
steps = -steps;
2653+
}
26662654

2667-
if (Components.Direction.is('rtl')) {
2668-
steps = -steps;
2669-
}
2655+
Components.Run.make(Components.Direction.resolve('<' + steps));
2656+
} else if (swipeDistance < -threshold && swipeDeg < settings.touchAngle) {
2657+
// While swipe is negative and lower than negative threshold move forward.
2658+
if (settings.perTouch) {
2659+
steps = Math.max(steps, -toInt(settings.perTouch));
2660+
}
26702661

2671-
Components.Run.make(Components.Direction.resolve('>' + steps));
2672-
} else {
2673-
// While swipe don't reach distance apply previous transform.
2674-
Components.Move.make();
2662+
if (Components.Direction.is('rtl')) {
2663+
steps = -steps;
26752664
}
2665+
2666+
Components.Run.make(Components.Direction.resolve('>' + steps));
2667+
} else {
2668+
// While swipe don't reach distance apply previous transform.
2669+
Components.Move.make();
26762670
}
26772671

26782672
Components.Html.root.classList.remove(settings.classes.dragging);
@@ -3087,6 +3081,8 @@ function Controls (Glide, Components, Events) {
30873081
*/
30883082
var Binder = new EventsBinder();
30893083

3084+
var capture = supportsPassive$1 ? { passive: true } : false;
3085+
30903086
var Controls = {
30913087
/**
30923088
* Inits arrows. Binds events listeners
@@ -3202,7 +3198,8 @@ function Controls (Glide, Components, Events) {
32023198
*/
32033199
bind: function bind(elements) {
32043200
for (var i = 0; i < elements.length; i++) {
3205-
Binder.on(['click', 'touchstart'], elements[i], this.click);
3201+
Binder.on('click', elements[i], this.click);
3202+
Binder.on('touchstart', elements[i], this.click, capture);
32063203
}
32073204
},
32083205

dist/glide.js

+27-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Glide.js v3.2.6
2+
* Glide.js v3.2.7
33
* (c) 2013-2019 Jędrzej Chałubek <[email protected]> (http://jedrzejchalubek.com/)
44
* Released under the MIT License.
55
*/
@@ -2553,7 +2553,6 @@
25532553
var swipeStartX = 0;
25542554
var swipeStartY = 0;
25552555
var disabled = false;
2556-
var moveable = true;
25572556
var capture = supportsPassive$1 ? { passive: true } : false;
25582557

25592558
var Swipe = {
@@ -2579,7 +2578,6 @@
25792578

25802579
var swipe = this.touches(event);
25812580

2582-
moveable = true;
25832581
swipeSin = null;
25842582
swipeStartX = toInt(swipe.pageX);
25852583
swipeStartY = toInt(swipe.pageY);
@@ -2616,7 +2614,7 @@
26162614

26172615
swipeSin = Math.asin(swipeCathetus / swipeHypotenuse);
26182616

2619-
if (moveable && swipeSin * 180 / Math.PI < touchAngle) {
2617+
if (swipeSin * 180 / Math.PI < touchAngle) {
26202618
event.stopPropagation();
26212619

26222620
Components.Move.make(subExSx * toFloat(touchRatio));
@@ -2625,8 +2623,6 @@
26252623

26262624
Events.emit('swipe.move');
26272625
} else {
2628-
moveable = false;
2629-
26302626
return false;
26312627
}
26322628
}
@@ -2652,33 +2648,31 @@
26522648

26532649
this.enable();
26542650

2655-
if (moveable) {
2656-
if (swipeDistance > threshold && swipeDeg < settings.touchAngle) {
2657-
// While swipe is positive and greater than threshold move backward.
2658-
if (settings.perTouch) {
2659-
steps = Math.min(steps, toInt(settings.perTouch));
2660-
}
2661-
2662-
if (Components.Direction.is('rtl')) {
2663-
steps = -steps;
2664-
}
2651+
if (swipeDistance > threshold && swipeDeg < settings.touchAngle) {
2652+
// While swipe is positive and greater than threshold move backward.
2653+
if (settings.perTouch) {
2654+
steps = Math.min(steps, toInt(settings.perTouch));
2655+
}
26652656

2666-
Components.Run.make(Components.Direction.resolve('<' + steps));
2667-
} else if (swipeDistance < -threshold && swipeDeg < settings.touchAngle) {
2668-
// While swipe is negative and lower than negative threshold move forward.
2669-
if (settings.perTouch) {
2670-
steps = Math.max(steps, -toInt(settings.perTouch));
2671-
}
2657+
if (Components.Direction.is('rtl')) {
2658+
steps = -steps;
2659+
}
26722660

2673-
if (Components.Direction.is('rtl')) {
2674-
steps = -steps;
2675-
}
2661+
Components.Run.make(Components.Direction.resolve('<' + steps));
2662+
} else if (swipeDistance < -threshold && swipeDeg < settings.touchAngle) {
2663+
// While swipe is negative and lower than negative threshold move forward.
2664+
if (settings.perTouch) {
2665+
steps = Math.max(steps, -toInt(settings.perTouch));
2666+
}
26762667

2677-
Components.Run.make(Components.Direction.resolve('>' + steps));
2678-
} else {
2679-
// While swipe don't reach distance apply previous transform.
2680-
Components.Move.make();
2668+
if (Components.Direction.is('rtl')) {
2669+
steps = -steps;
26812670
}
2671+
2672+
Components.Run.make(Components.Direction.resolve('>' + steps));
2673+
} else {
2674+
// While swipe don't reach distance apply previous transform.
2675+
Components.Move.make();
26822676
}
26832677

26842678
Components.Html.root.classList.remove(settings.classes.dragging);
@@ -3093,6 +3087,8 @@
30933087
*/
30943088
var Binder = new EventsBinder();
30953089

3090+
var capture = supportsPassive$1 ? { passive: true } : false;
3091+
30963092
var Controls = {
30973093
/**
30983094
* Inits arrows. Binds events listeners
@@ -3208,7 +3204,8 @@
32083204
*/
32093205
bind: function bind(elements) {
32103206
for (var i = 0; i < elements.length; i++) {
3211-
Binder.on(['click', 'touchstart'], elements[i], this.click);
3207+
Binder.on('click', elements[i], this.click);
3208+
Binder.on('touchstart', elements[i], this.click, capture);
32123209
}
32133210
},
32143211

0 commit comments

Comments
 (0)