@Override
	public void mouseReleased(MouseEvent e) {
		Node mouseOverN = manager.getMouseOverN();

		if (mouseOverN != null && dragAddNode != null && mouseOverN != dragAddNode) {
			Edge ed = manager.findEdge(dragAddNode, mouseOverN);
			if (ed == null)
				manager.addEdge(dragAddNode, mouseOverN, Edge.DEFAULT_LENGTH);
			else
				manager.deleteEdge(ed);

		} else if (mouseOverN == null && dragAddNode != null) {
			try {
				Node n = manager.addNode();
				manager.addEdge(dragAddNode, n, Edge.DEFAULT_LENGTH);
				n.drawx = manager.getMousePos().x;
				n.drawy = manager.getMousePos().y;
				manager.updatePosFromDraw(n);
			} catch (TGException tge) {
				System.err.println(tge.getMessage());
				tge.printStackTrace(System.err);
			}
		}

		/** Don't reset the damper on a mouseClicked */
		if (mouseWasDragged) {
			manager.resetDamper();
			manager.startDamper();
		}

		dragAddNode = null;
	}