|
|
@@ -334,6 +334,8 @@ class IHKSlider { |
|
|
|
|
|
|
|
|
hammer.on('panstart', (e) => { |
|
|
hammer.on('panstart', (e) => { |
|
|
sliderWidth = this.slideOverflow.width(); |
|
|
sliderWidth = this.slideOverflow.width(); |
|
|
|
|
|
// Disable click on drag |
|
|
|
|
|
this.slideWrapper.find('a').css('pointer-events', 'none'); |
|
|
|
|
|
|
|
|
this.dragging = true; |
|
|
this.dragging = true; |
|
|
startValue = this.slideWrapper.position().left; |
|
|
startValue = this.slideWrapper.position().left; |
|
|
@@ -357,6 +359,7 @@ class IHKSlider { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
hammer.on('panend', (e) => { |
|
|
hammer.on('panend', (e) => { |
|
|
|
|
|
this.slideWrapper.find('a').addClass('dragging'); |
|
|
this.dragging = false; |
|
|
this.dragging = false; |
|
|
|
|
|
|
|
|
requestAnimationFrame(() => { |
|
|
requestAnimationFrame(() => { |
|
|
@@ -368,7 +371,9 @@ class IHKSlider { |
|
|
} else { |
|
|
} else { |
|
|
this.changeSlide(this.currentSlide); |
|
|
this.changeSlide(this.currentSlide); |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
// Enable click on drag |
|
|
|
|
|
this.slideWrapper.find('a').css('pointer-events', 'all'); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|