@@ -57,7 +57,15 @@ public abstract class GraphViewNode : UNode
5757 protected GraphViewNode Parent { get ; private set ; }
5858
5959
60- public virtual void Update ( ) { }
60+ protected GraphViewNode ( )
61+ {
62+ capabilities &= ~ Capabilities . Movable ;
63+ capabilities &= ~ Capabilities . Deletable ;
64+ }
65+
66+ public virtual void Update ( )
67+ {
68+ }
6169
6270
6371 #region Description
@@ -129,9 +137,9 @@ protected Port InstantiatePort<TPort>(Direction direction)
129137
130138 #region Layout
131139
132- public const int HorizontalSpace = 80 ;
140+ public const int HORIZONTAL_SPACE = 80 ;
133141
134- public const int VerticalSpace = 80 ;
142+ public const int VERTICAL_SPACE = 80 ;
135143
136144 public static readonly Vector2 StandardNodeSize = new Vector2 ( 400 , 150 ) ;
137145
@@ -164,9 +172,10 @@ public Vector2 GetHierarchySize()
164172 subHierarchySize . x = Mathf . Max ( subHierarchySize . x , childSize . x ) ;
165173 subHierarchySize . y += childSize . y ;
166174 }
167- subHierarchySize . y += ( InternalInputs . Count - 1 ) * VerticalSpace ;
168175
169- var hierarchySize = GetNodeSize ( ) + new Vector2 ( HorizontalSpace , 0 ) ;
176+ subHierarchySize . y += ( InternalInputs . Count - 1 ) * VERTICAL_SPACE ;
177+
178+ var hierarchySize = GetNodeSize ( ) + new Vector2 ( HORIZONTAL_SPACE , 0 ) ;
170179 hierarchySize . y = Mathf . Max ( hierarchySize . y , subHierarchySize . y ) ;
171180 _hierarchySize = hierarchySize ;
172181
@@ -179,7 +188,7 @@ public void CalculateLayout(Vector2 origin)
179188 var nodePos = CalculateSubTreeRootNodePosition ( subTreeSize , origin ) ;
180189 SetPosition ( new Rect ( nodePos , Vector2 . zero ) ) ;
181190
182- origin . x -= GetNodeSize ( ) . x - HorizontalSpace ;
191+ origin . x -= GetNodeSize ( ) . x - HORIZONTAL_SPACE ;
183192 for ( int i = 0 ; i < InternalInputs . Count ; i ++ )
184193 {
185194 var childNode = InternalInputs [ i ] ;
@@ -202,7 +211,7 @@ public static Vector2 CalculateSubTreeRootNodePosition(Vector2 subTreeSize, Vect
202211
203212 #region Flags
204213
205- private uint _flags = 0 ;
214+ private uint _flags ;
206215
207216
208217 public bool CheckFlag ( NodeFlag flag )
0 commit comments