Update '12/dragable.js'

master
murtaugh 5 years ago
parent f4b9560e45
commit bdc1ff8f91

@ -54,16 +54,14 @@
}
makeDragable('#shell_03header', '#shell_03');
makeDragable('#week_05header', '#week_05');
/*
function makeDragable2(dragHandle2, dragTarget2) {
let dragObj2 = null; //object to be moved
let xOffset2 = 0; //used to prevent dragged object jumping to mouse location
@ -72,7 +70,7 @@ makeDragable('#shell_03header', '#shell_03');
document.querySelector(dragHandle2).addEventListener("mousedown", startDrag2, true);
document.querySelector(dragHandle2).addEventListener("touchstart", startDrag2, true);
/*sets offset parameters and starts listening for mouse-move*/
//sets offset parameters and starts listening for mouse-move
function startDrag2(x) {
x.preventDefault();
x.stopPropagation();
@ -91,7 +89,7 @@ makeDragable('#shell_03header', '#shell_03');
}
}
/*Drag object*/
//Drag object
function dragObject2(x) {
x.preventDefault();
x.stopPropagation();
@ -107,7 +105,7 @@ makeDragable('#shell_03header', '#shell_03');
}
}
/*End dragging*/
//End dragging
window.onmouseup = function(x) {
if (dragObj2) {
dragObj2 = null;
@ -116,8 +114,7 @@ makeDragable('#shell_03header', '#shell_03');
}
};
}
makeDragable2('#week_05header', '#week_05');
*/

Loading…
Cancel
Save