Exemplo n.º 1
0
        /// <summary>
        /// Returns a handle that is constrained to the layout rectangle of the port's owner node.
        /// </summary>
        public IHandle GetHandle(IInputModeContext context, IEdge edge, bool sourceHandle)
        {
            IPort port = sourceHandle ? edge.SourcePort : edge.TargetPort;

            return(port.Owner is INode
               ? new NodeLayoutPortLocationHandle((INode)port.Owner, port.Lookup <IHandle>())
               : port.Lookup <IHandle>());
        }