public void mouseLeftReleased(int x_old, int y_old, int x_new, int y_new) {
            x_old = (int) (x_old / this.getScaleRatio()[0]);
            x_new = (int) (x_new / this.getScaleRatio()[0]);
            y_old = (int) (y_old / this.getScaleRatio()[1]);
            y_new = (int) (y_new / this.getScaleRatio()[1]);

            // Old and current positions

            // Move place / transition
            // && resource isSelected
            if (!ellipseButton.isSelected() && !rectangleButton.isSelected() && !lineButton.isSelected()) {
                controller.moveElement(x_old, y_old, x_new, y_new);
            }

            // Add arc
            if (lineButton.isSelected() && draggedObject instanceof Line2D) {
                controller.addArc("Arc", x_old, y_old, x_new, y_new);
            }

            /*
            if (this.selectedMagneticLine != null) {
                controller.setElementsToMagneticLine(selectedMagneticLine);
            }
            */ 
            for (MagneticLine magneticLine : graph.getMagneticLines()) {
                controller.setElementsToMagneticLine(magneticLine);
            }
            
            draggedObject = null;
            draggedElement = null;
            repaint();
        }