g6/docs/api/graph/stack.en.md
2020-11-13 22:33:15 +08:00

937 B
Raw Blame History

title order
Opeartion Stack 13

pushStack(action, data, stackType)

Push operation。

Implemented the undo function, refer to here

Implemented the redo function, refer tohere

参数

Name Type Required Description
action string false operation typethe value of 'update' by default
data unknown false Stacked data
stackType 'redo' 'undo' false

getUndoStack()

get undo stack。

getRedoStack()

get redo stack。

getStackData()

get the data in stack。

The return value type

{
  undoStack: StackData[];
  redoStack: StackData[];
};

clearStack()

Clear the data in stack。