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

            if (m_LineView == null)
            {
                m_LineView = new LineView();
            }
            m_GraphView = selectedElement.GetFirstAncestorOfType <UGraphView>();
            m_GraphView.Add(m_LineView);
        }
Beispiel #2
0
        public override void BeginSnap(GraphElement selectedElement)
        {
            //if (IsActive) {
            //	throw new InvalidOperationException("SnapStrategy.BeginSnap: Snap to borders already active. Call EndSnap() first.");
            //}
            IsActive = true;

            if (m_LineView == null)
            {
                m_LineView = new LineView();
            }

            m_GraphView = selectedElement.GetFirstAncestorOfType <UGraphView>();
            m_GraphView.Add(m_LineView);
            m_SnappableRects = GetNotSelectedElementRectsInView(selectedElement);
        }