diff --git a/core/document/src/document.rs b/core/document/src/document.rs
index 17b1baac..e12575db 100644
--- a/core/document/src/document.rs
+++ b/core/document/src/document.rs
@@ -141,7 +141,7 @@ impl Document {
}
/// Returns a reference to the layer or folder at the path. Does not return an error for root
- pub fn document_layer(&mut self, path: &[LayerId]) -> Result<&Layer, DocumentError> {
+ pub fn document_layer(&self, path: &[LayerId]) -> Result<&Layer, DocumentError> {
if path.is_empty() {
return Ok(&self.root);
}
@@ -227,13 +227,20 @@ impl Document {
Ok(())
}
- pub fn layer_axis_aligned_bounding_box(&self, path: &[LayerId]) -> Result<[DVec2; 2], DocumentError> {
- let layer = self.layer(path)?;
- Ok(layer.bounding_box(self.root.transform * layer.transform, layer.style))
+ pub fn layer_axis_aligned_bounding_box(&self, path: &[LayerId]) -> Result