/// <summary>
 ///     Uploads given node.
 /// </summary>
 public virtual void UnloadInspectorTarget(JEMNodeGraph.Node node)
 {
     node.OnNodePositionChanged  -= OnNodePositionChanged;
     node.OnOutgoingNodesChanged -= OnOutgoingNodesChanged;
     node.OnIncomingNodesChanged -= OnIncomingNodesChanged;
     Repaint();
 }
        /// <summary>
        ///     Sets inspector target.
        /// </summary>
        public virtual void SetInspectorTarget(JEMNodeGraph.Node node)
        {
            if (NodeTarget != null && node == NodeTarget)
            {
                LoadInspectorTarget(node);
                return;
            }

            if (NodeTarget != null)
            {
                UnloadInspectorTarget(NodeTarget);
            }

            NodeTarget = node;
            if (NodeTarget != null)
            {
                LoadInspectorTarget(node);
            }
        }
 private void OnOutgoingNodesChanged(JEMNodeGraph.Node thisNode, IReadOnlyList <JEMNodeGraph.Node> lastOutgoingNodes,
                                     IReadOnlyList <JEMNodeGraph.Node> newOutgoingNodes)
 {
     Repaint();
 }
 private void OnIncomingNodesChanged(JEMNodeGraph.Node thisNode, IReadOnlyList <JEMNodeGraph.Node> lastIncomingNodes,
                                     IReadOnlyList <JEMNodeGraph.Node> newIncomingNodes)
 {
     Repaint();
 }
 private void OnNodePositionChanged(JEMNodeGraph.Node thisNode, Vector2 oldPosition, Vector2 newPosition)
 {
     Repaint();
 }