Changeset 0c6b92a for imaps-frontend/node_modules/konva/lib/DragAndDrop.js
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/konva/lib/DragAndDrop.js
rd565449 r0c6b92a 6 6 exports.DD = { 7 7 get isDragging() { 8 varflag = false;8 let flag = false; 9 9 exports.DD._dragElements.forEach((elem) => { 10 10 if (elem.dragStatus === 'dragging') { … … 16 16 justDragged: false, 17 17 get node() { 18 varnode;18 let node; 19 19 exports.DD._dragElements.forEach((elem) => { 20 20 node = elem.node; … … 37 37 } 38 38 if (elem.dragStatus !== 'dragging') { 39 vardragDistance = node.dragDistance();40 vardistance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));39 const dragDistance = node.dragDistance(); 40 const distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y)); 41 41 if (distance < dragDistance) { 42 42 return; … … 105 105 window.addEventListener('mouseup', exports.DD._endDragBefore, true); 106 106 window.addEventListener('touchend', exports.DD._endDragBefore, true); 107 window.addEventListener('touchcancel', exports.DD._endDragBefore, true); 107 108 window.addEventListener('mousemove', exports.DD._drag); 108 109 window.addEventListener('touchmove', exports.DD._drag); 109 110 window.addEventListener('mouseup', exports.DD._endDragAfter, false); 110 111 window.addEventListener('touchend', exports.DD._endDragAfter, false); 112 window.addEventListener('touchcancel', exports.DD._endDragAfter, false); 111 113 }
Note:
See TracChangeset
for help on using the changeset viewer.