Example #1
0
            public void Position(EndpointItem endpoint)
            {
                var endpointVisual = diagram.GetItemFromContainer(endpoint);

                if (endpointVisual == null)
                {
                    return;
                }

                if (index == 0)
                {
                    firstX = endpointVisual.X;
                }

                if (lastEndpoint != null)
                {
                    endpointVisual.X = firstX + ((lastEndpoint.ActualWidth) * index);
                }

                if (endpointVisual.ActualHeight < MaxHeight)
                {
                    endpointVisual.Height = MaxHeight;
                }

                endpointVisual.Y = -MaxHeight;

                lastEndpoint       = endpointVisual;
                position[endpoint] = index;
                index++;
            }
Example #2
0
 public int GetIndexPosition(EndpointItem endpoint)
 {
     return(position[endpoint]);
 }
 public int GetIndexPosition(EndpointItem endpoint) => position[endpoint];