|
|
|
@ -80,16 +80,16 @@ 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;
|
|
|
|
|
window.addEventListener('mousemove', dragObject, 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;
|
|
|
|
|
window.addEventListener('touchmove', dragObject, true);
|
|
|
|
|
window.addEventListener('touchmove', dragObject2, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*Drag object*/
|
|
|
|
|
function dragObject(x) {
|
|
|
|
|
function dragObject2(x) {
|
|
|
|
|
x.preventDefault();
|
|
|
|
|
x.stopPropagation();
|
|
|
|
|
|
|
|
|
|