Canvas drawing drag problem

draw the subway map to achieve the drag function, the first drag is normal, the back drag will appear a backward effect in the opposite direction.

function clickSubway(e) {
    isDrag=true;
    start_x=e.pageX-draw.offsetLeft;
    start_y=e.pageY-draw.offsetTop;

}
//
function dragSubway(e) {
    end_x=e.pageX-draw.offsetLeft;
    end_y=e.pageY-draw.offsetTop;
    mx=end_x-start_x;
    my=end_y-start_y;  //,
    if(isDrag){
        drawSubway();
    }

}

function stopDrag(e) {
    isDrag=false;
    e.stopPropagation();
    e.preventDefault();

}
Feb.28,2021

because of the border. Have you considered the width of the frame?


similar problems have been encountered, but I draw with SVG, mainly because the problem of the parent container seems to be, you can pay attention to

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9dde6-198c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9dde6-198c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?