예제 #1
0
        private void UpdateSelectedObject(PointF newPoint)
        {
            if ((_selectedObject != null) && (_selectedObject is GraphNode))
            {
                GraphNode node = _selectedObject as GraphNode;

                SizeF delta = new SizeF(newPoint.X - _lastDragPoint.X, newPoint.Y - _lastDragPoint.Y);

                node.MoveLocation(delta, new RectangleF(0, 0, DocumentWidth, DocumentHeight));
                _lastDragPoint = newPoint;
                Dirty          = true;
                Invalidate();
            }
        }
예제 #2
0
        private void UpdateSelectedObject(PointF newPoint)
        {
            if ((_selectedObject != null) && (_selectedObject is GraphNode))
            {
                GraphNode node = _selectedObject as GraphNode;

                SizeF delta = new SizeF(newPoint.X - _lastDragPoint.X, newPoint.Y - _lastDragPoint.Y);

                node.MoveLocation(delta, new RectangleF(0, 0, MAX_DOCUMENT_WIDTH, MAX_DOCUMENT_HEIGHT));
                _lastDragPoint = newPoint;
                Dirty          = true;
                Invalidate();
            }
        }