Example #1
0
        public override void BeginSnap(GraphElement selectedElement)
        {
            if (IsActive)
            {
                throw new InvalidOperationException("SnapStrategy.BeginSnap: Snap to spacing already active. Call EndSnap() first.");
            }
            IsActive = true;

            m_GraphView = selectedElement.GraphView;
            if (m_LineView == null)
            {
                m_LineView = new LineView(m_GraphView);
            }
            m_GraphView.Add(m_LineView);
        }