I added ViewDelegates class that sits in a BaseNode which the NodeView assigns Actions/Funcs relating to things like get/set the current size or position. I did this because I wanted to generate a graph on the fly but I couldn't get the size of the node properly. But it's there anyway to be expanded upon if there's anything in the view that's required to enable certain functionalities.
If the NodeView hasn't initialised yet it modifies the initialposition.
Added the ViewDelegates into BaseNode as View so:
baseNode.View.GetPosition().
baseNode.View.SetPosition(Vector2)
baseNode.View.GetSize()
baseNode.View.GetRect()
baseNode.View.SetRect(Rect)
I can foresee a possible bug in the Node Init where if the position has been changed from the initial position to 0,0 then it would move back to the initial position when opening a saved graph.
I added ViewDelegates class that sits in a BaseNode which the NodeView assigns Actions/Funcs relating to things like get/set the current size or position. I did this because I wanted to generate a graph on the fly but I couldn't get the size of the node properly. But it's there anyway to be expanded upon if there's anything in the view that's required to enable certain functionalities.
If the NodeView hasn't initialised yet it modifies the initialposition.
Added the ViewDelegates into BaseNode as View so: baseNode.View.GetPosition(). baseNode.View.SetPosition(Vector2) baseNode.View.GetSize() baseNode.View.GetRect() baseNode.View.SetRect(Rect)