diff options
author | Pranam Lashkari <lpranam@collabora.com> | 2020-08-31 18:45:45 +0530 |
---|---|---|
committer | Pranam Lashkari <lpranam@collabora.com> | 2020-08-31 19:21:48 +0200 |
commit | 40fb94207e34d46aaba073b09667f53286d0ef0a (patch) | |
tree | 05b92b1fb27556c682109fae89c06236e993bd24 | |
parent | cypress: allow equality here. (diff) | |
download | online-40fb94207e34d46aaba073b09667f53286d0ef0a.tar.gz online-40fb94207e34d46aaba073b09667f53286d0ef0a.zip |
leaflet: fixed js error in slide reordering with touch screen
Change-Id: I7e1c864640f5829166616e5bf40b95646d913b23
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101736
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
-rw-r--r-- | loleaflet/src/control/Control.PartsPreview.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/loleaflet/src/control/Control.PartsPreview.js b/loleaflet/src/control/Control.PartsPreview.js index 718d65b505..af553f5528 100644 --- a/loleaflet/src/control/Control.PartsPreview.js +++ b/loleaflet/src/control/Control.PartsPreview.js @@ -585,7 +585,7 @@ L.Control.PartsPreview = L.Control.extend({ e.preventDefault(); } - this.currentNode = document.elementFromPoint(e.touches[0].clientX, e.touches[0].clientY); + this.currentNode = document.elementFromPoint(e.originalEvent.touches[0].clientX, e.originalEvent.touches[0].clientY); if (this.currentNode !== this.previousNode && this.previousNode !== null) { $('.preview-frame').removeClass('preview-img-dropsite'); @@ -597,8 +597,8 @@ L.Control.PartsPreview = L.Control.extend({ this.previousNode = this.currentNode; - $(this.draggedSlide).css('left', e.touches[0].clientX - (e.target.width/2)); - $(this.draggedSlide).css('top', e.touches[0].clientY - e.target.height); + $(this.draggedSlide).css('left', e.originalEvent.touches[0].clientX - (e.target.width/2)); + $(this.draggedSlide).css('top', e.originalEvent.touches[0].clientY - e.target.height); return false; }, |