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

Merge 3a8ceca30ba96fc685b9eedf2a45254a3c0fd579 into 8f7e3299d6f9567e8258c8878a45ffb7ac0b426f

This commit is contained in:
José Rey Méndez 2018-08-27 09:34:09 +00:00 committed by GitHub
commit 65e541ed12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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; }
}
}
}