1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00

Allow graphs to repain on update

This commit is contained in:
Jose Luis Rey Mendez 2018-08-23 11:37:09 -03:00
parent 83acd16d4b
commit 3a8ceca30b
2 changed files with 12 additions and 0 deletions

View File

@ -56,6 +56,13 @@ namespace XNodeEditor {
}
}
public void Update() {
// Repaint the graph if it is required during update.
if (graph.RepaintOnUpdate) {
Repaint();
}
}
public Dictionary<XNode.Node, Vector2> nodeSizes { get { return _nodeSizes; } }
private Dictionary<XNode.Node, Vector2> _nodeSizes = new Dictionary<XNode.Node, Vector2>();
public XNode.NodeGraph graph;

View File

@ -78,5 +78,10 @@ namespace XNode {
// Remove all nodes prior to graph destruction
Clear();
}
/// <summary>Whether the graph requires a repaint during updates.</summary>
public virtual bool RepaintOnUpdate {
get { return false; }
}
}
}