touch-drag: only compute elementFromPoint if shift key is pressed
This commit is contained in:
parent
c61cad7d24
commit
881c050f12
1 changed files with 4 additions and 2 deletions
|
|
@ -89,8 +89,10 @@
|
|||
element.on("touchmove.drag", function(e) {
|
||||
e.preventDefault()
|
||||
|
||||
// get element under pointer: usefull only for master dragging (when target changes during drag)
|
||||
e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY)
|
||||
if (e.shiftKey) {
|
||||
// get element under pointer: usefull only for master dragging (when target changes during drag)
|
||||
e.target = document.elementFromPoint(e.originalEvent.changedTouches[0].clientX, e.originalEvent.changedTouches[0].clientY)
|
||||
}
|
||||
|
||||
e.pageX = e.originalEvent.targetTouches[0].pageX
|
||||
e.pageY = e.originalEvent.targetTouches[0].pageY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue