@Override
    public void mousePressed(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON3 && label.getOnCanvas()) {
            label.erase(canvas.getCurrentLayer());
        } else if (e.getButton() == MouseEvent.BUTTON1 && label.getOnCanvas()){
            label.drawTile(canvas.getCurrentTile(), canvas.getCurrentLayer());
        }
        if(!label.getOnCanvas()){
            canvas.changeCurrentTile(label.id);
        }
    }