Mark this delta as the last op of a user interaction, so the undo cursor treats it as a checkpoint.
(&mut self, timestamp: TimeStamp)
| 69 | |
| 70 | /// Mark this delta as the last op of a user interaction, so the undo cursor treats it as a checkpoint. |
| 71 | pub fn mark_interaction_end(&mut self, timestamp: TimeStamp) { |
| 72 | self.attributes.set(attr::delta::INTERACTION_END, serde_json::Value::Bool(true), timestamp); |
| 73 | } |
| 74 | |
| 75 | pub fn is_interaction_end(&self) -> bool { |
| 76 | self.attributes.get(attr::delta::INTERACTION_END).is_some_and(|marker| marker.value == serde_json::Value::Bool(true)) |