Class HistoryManager
The actions can be recorded into the history manager, such that the undo and redo operations can be performed.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.JavaScript.DataVisualization.Models.Diagram
Assembly: Syncfusion.EJ.dll
Syntax
public class HistoryManager : EJTagHelper
Constructors
HistoryManager()
Declaration
public HistoryManager()
Properties
Redo
Gets or sets what should be happened while trying to redo a custom change
Declaration
[JsonProperty("redo")]
public string Redo { get; set; }
Property Value
Type | Description |
---|---|
System.String | null |
Examples
DiagramProperties Model = new DiagramProperties();
Model.HistoryManager.Undo = "customUndoRedo";
Model.HistoryManager.Redo = "customUndoRedo";
<script>
//Method to handle the custom action
function customUndoRedo(args) {
var diagram = $("#diagram").ejDiagram("instance");
var Node = args.object;
var CurrentState = Node.empInfo;
//Resets the state
Node.empInfo = args.prevState;
//Saves the previous state
args.prevState = CurrentState;
}
</script>
StackLimit
Declaration
[JsonProperty("stackLimit")]
public int StackLimit { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Undo
Gets or sets what should be happened while trying to revert a custom change
Declaration
[JsonProperty("undo")]
public string Undo { get; set; }
Property Value
Type | Description |
---|---|
System.String | null |
Examples
DiagramProperties Model = new DiagramProperties();
Model.HistoryManager.Undo = "customUndoRedo";
Model.HistoryManager.Redo = "customUndoRedo";
<script>
//Method to handle the custom action
function customUndoRedo(args) {
var diagram = $("#diagram").ejDiagram("instance");
var Node = args.object;
var CurrentState = Node.empInfo;
//Resets the state
Node.empInfo = args.prevState;
//Saves the previous state
args.prevState = CurrentState;
}
</script>