X-Git-Url: https://scm.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/26f695c080134260ae2133136b62048dcd43c376..ac93b62d919ba13d13ec3f5f2189776093483e53:/skins/photo_film_viewer.js diff --git a/skins/photo_film_viewer.js b/skins/photo_film_viewer.js index 35679e1..1ad17ce 100644 --- a/skins/photo_film_viewer.js +++ b/skins/photo_film_viewer.js @@ -613,16 +613,20 @@ else if (browser.isIE6up) { FilmSlider.prototype.touchStartHandler = function(evt) { this.filmStartX = parseInt(this.film.style.left, 10); - this.touchStartX = evt.pageX; + this.touchStartX = evt.changedTouches[0].screenX; }; FilmSlider.prototype.touchMoveHandler = function(evt) { - var delta = this.touchStartX - evt.pageX; + disableDefault(evt); + var delta = this.touchStartX - evt.changedTouches[0].screenX; var posX = this.filmStartX - delta; this.setFilmPosition(posX); }; FilmSlider.prototype.touchEndHandler = function(evt) { + if (evt.changedTouches[0].screenX !== this.touchStartX) { + disableDefault(evt); + } this.touchStartX = undefined; };