Files
Graphite/core/document/src/operation.rs
TrueDoctor 2849b99b59 Add transactions for temporary modifications to the document (#77)
* Add transactions for temporary modifications to the document

* Add DiscardTempFolder Operation

* Add clearFolder operation

* Rename Temp to Work
2021-04-21 00:32:36 +02:00

50 lines
691 B
Rust

use crate::LayerId;
#[derive(Debug, Clone, PartialEq)]
pub enum Operation {
AddCircle {
path: Vec<LayerId>,
insert_index: isize,
cx: f64,
cy: f64,
r: f64,
},
AddRect {
path: Vec<LayerId>,
insert_index: isize,
x0: f64,
y0: f64,
x1: f64,
y1: f64,
},
AddLine {
path: Vec<LayerId>,
insert_index: isize,
x0: f64,
y0: f64,
x1: f64,
y1: f64,
},
AddShape {
path: Vec<LayerId>,
insert_index: isize,
x0: f64,
y0: f64,
x1: f64,
y1: f64,
sides: u8,
},
DeleteLayer {
path: Vec<LayerId>,
},
AddFolder {
path: Vec<LayerId>,
},
MountWorkingFolder {
path: Vec<LayerId>,
},
DiscardWorkingFolder,
ClearWorkingFolder,
CommitTransaction,
}