Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/konva/lib/DragAndDrop.js

    rd565449 r0c6b92a  
    66exports.DD = {
    77    get isDragging() {
    8         var flag = false;
     8        let flag = false;
    99        exports.DD._dragElements.forEach((elem) => {
    1010            if (elem.dragStatus === 'dragging') {
     
    1616    justDragged: false,
    1717    get node() {
    18         var node;
     18        let node;
    1919        exports.DD._dragElements.forEach((elem) => {
    2020            node = elem.node;
     
    3737            }
    3838            if (elem.dragStatus !== 'dragging') {
    39                 var dragDistance = node.dragDistance();
    40                 var distance = 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));
    4141                if (distance < dragDistance) {
    4242                    return;
     
    105105    window.addEventListener('mouseup', exports.DD._endDragBefore, true);
    106106    window.addEventListener('touchend', exports.DD._endDragBefore, true);
     107    window.addEventListener('touchcancel', exports.DD._endDragBefore, true);
    107108    window.addEventListener('mousemove', exports.DD._drag);
    108109    window.addEventListener('touchmove', exports.DD._drag);
    109110    window.addEventListener('mouseup', exports.DD._endDragAfter, false);
    110111    window.addEventListener('touchend', exports.DD._endDragAfter, false);
     112    window.addEventListener('touchcancel', exports.DD._endDragAfter, false);
    111113}
Note: See TracChangeset for help on using the changeset viewer.