MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / mark_interaction_end

Method mark_interaction_end

document/graph-storage/src/crdt.rs:71–73  ·  view source on GitHub ↗

Mark this delta as the last op of a user interaction, so the undo cursor treats it as a checkpoint.

(&mut self, timestamp: TimeStamp)

Source from the content-addressed store, hash-verified

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))

Calls 1

setMethod · 0.45