jellyflow_runtime/runtime/store/view/history.rs
1use jellyflow_core::ops::GraphHistory;
2
3use super::super::NodeGraphStore;
4
5impl NodeGraphStore {
6 pub fn history(&self) -> &GraphHistory {
7 &self.history
8 }
9
10 pub fn clear_history(&mut self) {
11 self.history = GraphHistory::default();
12 self.notify_selectors();
13 }
14
15 pub fn can_undo(&self) -> bool {
16 self.history.can_undo()
17 }
18
19 pub fn can_redo(&self) -> bool {
20 self.history.can_redo()
21 }
22}