コード例 #1
0
        private void NodeAreaChanged(WeakReference <TNode> nodeRef, Changed <RectangleF> c)
        {
            if (nodeRef.TryGetTarget(out TNode n))
            {
                SpatiallyOrderedNodes.Remove(n);
                SpatiallyOrderedNodes.Add(n, c.To);

                foreach (var connector in n.Data.Connectors)
                {
                    foreach (var connection in connector.Connections)
                    {
                        DisconnectionUpdate(connector, connection, c.From);
                    }
                }

                foreach (var connector in n.Data.Connectors)
                {
                    foreach (var connection in connector.Connections)
                    {
                        ConnectionUpdate(connection, connector, true);
                    }
                }
            }
        }
コード例 #2
0
 public void OnNodeAdded(TNode node)
 {
     SpatiallyOrderedNodes.Add(node, node.Renderer.Area);
     AddNodeMovedCallbacks(node);
     StoreConnections(node, true);
 }