mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Add responses in document for layer system (#91)
This commit is contained in:
committed by
Keavon Chambers
parent
b27eaf3fae
commit
f05cb30acb
@@ -47,6 +47,10 @@ impl Folder {
|
||||
self.layer_ids.as_slice()
|
||||
}
|
||||
|
||||
pub fn layers(&self) -> &[Layer] {
|
||||
self.layers.as_slice()
|
||||
}
|
||||
|
||||
pub fn layer(&self, id: LayerId) -> Option<&Layer> {
|
||||
let pos = self.layer_ids.iter().position(|x| *x == id)?;
|
||||
Some(&self.layers[pos])
|
||||
|
||||
Reference in New Issue
Block a user