@Override
    public void mouseDragged(MouseEvent e) {
        if (e.getPoint().x >= 0 && e.getPoint().x <= getWidth() && e.getPoint().y >= 0 && e.getPoint().y <= getHeight()) {
            if (right) {
                MapTile tile = getTile();
                moveMap(start.getGX(mapLoc) - tile.getGX(mapLoc), start.getGY(mapLoc) - tile.getGY(mapLoc));
            }
            if (left) {
                if (e.getPoint().distance(pathCursor) >= (dragSpacing * 2 * scale)) {
                    pathCursor = e.getPoint();
                    if(TILES.isEmpty() || !TILES.get(TILES.size()-1).equals(getTile()))
                        TILES.add(getTile());
                }
            } else {
                pathCursor = e.getPoint();
            }
            mouse = e.getPoint();
            getParent().repaint();
        }
    }