Class MoveElementsCommand
Command to move one or more elements (nodes, shapes) to new positions. Works with any ICanvasElement that has a settable Position property.
public class MoveElementsCommand : IGraphCommand
- Inheritance
-
MoveElementsCommand
- Implements
- Inherited Members
Constructors
MoveElementsCommand(Graph, ICanvasElement, Point, Point)
Creates a move command for a single element.
public MoveElementsCommand(Graph graph, ICanvasElement element, Point oldPosition, Point newPosition)
Parameters
graphGraphelementICanvasElementoldPositionPointnewPositionPoint
MoveElementsCommand(Graph, Dictionary<string, Point>, Dictionary<string, Point>)
Creates a move command for multiple elements.
public MoveElementsCommand(Graph graph, Dictionary<string, Point> oldPositions, Dictionary<string, Point> newPositions)
Parameters
graphGrapholdPositionsDictionary<string, Point>newPositionsDictionary<string, Point>
Properties
Description
Gets a human-readable description of the command.
public string Description { get; }
Property Value
Methods
Execute()
Executes the command.
public void Execute()
Undo()
Reverses the command (undo).
public void Undo()