drag & drop references

This commit is contained in:
Jan Prochazka
2021-03-18 18:34:36 +01:00
parent 9e9df60d37
commit 47a045fc24
5 changed files with 161 additions and 23 deletions

View File

@@ -3,6 +3,7 @@ export default function moveDrag(node, [onStart, onMove, onEnd]) {
let startY = null;
const handleMoveDown = e => {
if (e.button != 0) return;
startX = e.clientX;
startY = e.clientY;
document.addEventListener('mousemove', handleMoveMove, true);