Class HistoryManagerBuilder
Inheritance
System.Object
HistoryManagerBuilder
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
Assembly: Syncfusion.EJ.dll
Syntax
public class HistoryManagerBuilder
Constructors
HistoryManagerBuilder(DiagramProperties)
Declaration
public HistoryManagerBuilder(DiagramProperties model)
Parameters
| Type | Name | Description |
|---|---|---|
| DiagramProperties | model |
Fields
diagramModel
Declaration
public DiagramProperties diagramModel
Field Value
| Type | Description |
|---|---|
| DiagramProperties |
Methods
Redo(String)
Gets or sets what should be happened while trying to revert a custom change
Declaration
public HistoryManagerBuilder Redo(string redo)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | redo |
Returns
| Type | Description |
|---|---|
| HistoryManagerBuilder | null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").HistoryManager(h => h.Undo("customUndoRedo").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>
Undo(String)
Gets or sets what should be happened while trying to revert a custom change
Declaration
public HistoryManagerBuilder Undo(string undo)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | undo |
Returns
| Type | Description |
|---|---|
| HistoryManagerBuilder | null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").HistoryManager(h => h.Undo("customUndoRedo").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>