Пример #1
0
 public void OnNodeRemoved(TNode node)
 {
     StoreConnections(node, false);
     SpatiallyOrderedNodes.Remove(node);
     node.Renderer.AreaChanged -= m_nodeMovedCallbacks[node];
     m_nodeMovedCallbacks.Remove(node);
 }
Пример #2
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);
                    }
                }
            }
        }
Пример #3
0
 public void OnNodeAdded(TNode node)
 {
     SpatiallyOrderedNodes.Add(node, node.Renderer.Area);
     AddNodeMovedCallbacks(node);
     StoreConnections(node, true);
 }