Merge pull request #7124 from penpot/ladybenko-11799-fix-remove-layout

🐛 Fix removing layout (wasm)
This commit is contained in:
Elena Torró
2025-08-18 09:52:22 +02:00
committed by GitHub
6 changed files with 297 additions and 252 deletions

View File

@@ -347,6 +347,11 @@ impl Shape {
self.vertical_align
}
pub fn clear_constraints(&mut self) {
self.constraint_h = None;
self.constraint_v = None;
}
pub fn set_constraint_h(&mut self, constraint: Option<ConstraintH>) {
self.constraint_h = constraint;
}
@@ -402,6 +407,13 @@ impl Shape {
});
}
pub fn clear_layout(&mut self) {
self.layout_item = None;
if let Type::Frame(data) = &mut self.shape_type {
data.layout = None;
}
}
// FIXME: These arguments could be grouped or simplified
#[allow(clippy::too_many_arguments)]
pub fn set_flex_layout_data(