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