|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
|
|
|
|
|
function makeDragable(dragHandle, dragTarget) {
|
|
|
|
|
let dragObj = null; //object to be moved
|
|
|
|
|
let xOffset = 0; //used to prevent dragged object jumping to mouse location
|
|
|
|
|
let yOffset = 0;
|
|
|
|
|
var dragObj = null; //object to be moved
|
|
|
|
|
var xOffset = 0; //used to prevent dragged object jumping to mouse location
|
|
|
|
|
var yOffset = 0;
|
|
|
|
|
|
|
|
|
|
document.querySelector(dragHandle).addEventListener("mousedown", startDrag, true);
|
|
|
|
|
document.querySelector(dragHandle).addEventListener("touchstart", startDrag, true);
|
|
|
|
|