|
|
|
|
|
|
public void DeleteElement(CanvasElement e) |
|
|
|
{ |
|
|
|
Debug.Log("Trying to delete " + e); |
|
|
|
if (e is DrawableMaterialNode) |
|
|
|
{ |
|
|
|
Debug.Log("Deleting node " + e + " " + ((DrawableMaterialNode) e).m_Node); |
|
|
|
graph.currentGraph.RemoveNode(((DrawableMaterialNode) e).m_Node); |
|
|
|
} |
|
|
|
else if (e is Edge<NodeAnchor>) |
|
|
|
|
|
|
|
if (e is Edge<NodeAnchor>) |
|
|
|
|
|
|
|
Debug.Log("Deleting edge " + edge + " " + ((DrawableMaterialNode) e).m_Node); |
|
|
|
} |
|
|
|
else if (e is DrawableMaterialNode) |
|
|
|
{ |
|
|
|
Debug.Log("Deleting node " + e + " " + ((DrawableMaterialNode) e).m_Node); |
|
|
|
graph.currentGraph.RemoveNode(((DrawableMaterialNode) e).m_Node); |
|
|
|
} |
|
|
|
|
|
|
|
e.ParentCanvas().ReloadData(); |
|
|
|