Update '12/dragable.js'

master
Max Lehmann 5 years ago
parent 6bbcdd8057
commit ae7adb0305

@ -67,11 +67,11 @@ makeDragable('#shell_03header', '#shell_03')
let xOffset2 = 0; //used to prevent dragged object jumping to mouse location
let yOffset2 = 0;
document.querySelector(dragHandle2).addEventListener("mousedown", startDrag, true);
document.querySelector(dragHandle2).addEventListener("touchstart", startDrag, true);
document.querySelector(dragHandle2).addEventListener("mousedown", startDrag2, true);
document.querySelector(dragHandle2).addEventListener("touchstart", startDrag2, true);
/*sets offset parameters and starts listening for mouse-move*/
function startDrag(x) {
function startDrag2(x) {
e.preventDefault();
e.stopPropagation();
dragObj2 = document.querySelector(dragTarget);

Loading…
Cancel
Save