mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🔧 Fix text align selrect and update regression tests
This commit is contained in:
@@ -684,6 +684,13 @@ impl Shape {
|
||||
.get_or_init(|| self.calculate_extrect(shapes_pool, modifiers))
|
||||
}
|
||||
|
||||
pub fn get_text_content(&self) -> &TextContent {
|
||||
match &self.shape_type {
|
||||
crate::shapes::Type::Text(text_content) => text_content,
|
||||
_ => panic!("Shape is not of type Text"),
|
||||
}
|
||||
}
|
||||
|
||||
/// Calculates the bounding rectangle for a selrect shape's shadow, taking into account
|
||||
/// stroke widths and shadow properties.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user