From bdc1ff8f91fe846c8defd981dd3cc3139aadd638 Mon Sep 17 00:00:00 2001 From: murtaugh Date: Thu, 11 Jun 2020 14:35:13 +0200 Subject: [PATCH] Update '12/dragable.js' --- 12/dragable.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/12/dragable.js b/12/dragable.js index c8031d5..704b94b 100644 --- a/12/dragable.js +++ b/12/dragable.js @@ -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'); +*/