Update '12/dragable.js'

master
Max Lehmann 5 years ago
parent f00faf2235
commit a3100597d3

@ -83,7 +83,7 @@ makeDragable('#shell_03header', '#shell_03')
xOffset2 = x.clientX - rect.left; //clientX and getBoundingClientRect() both use viewable area adjusted when scrolling aka 'viewport' xOffset2 = x.clientX - rect.left; //clientX and getBoundingClientRect() both use viewable area adjusted when scrolling aka 'viewport'
yOffset2 = x.clientY - rect.top; yOffset2 = x.clientY - rect.top;
window.addEventListener('mousemove', dragObject2, true); window.addEventListener('mousemove', dragObject2, true);
} else if(e.type=="touchstart") { } else if(x.type=="touchstart") {
xOffset2 = x.targetTouches[0].clientX - rect.left; xOffset2 = x.targetTouches[0].clientX - rect.left;
yOffset2 = x.targetTouches[0].clientY - rect.top; yOffset2 = x.targetTouches[0].clientY - rect.top;
window.addEventListener('touchmove', dragObject2, true); window.addEventListener('touchmove', dragObject2, true);

Loading…
Cancel
Save