mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 11:16:11 +02:00
✨ Improvements on flex layout positioning
This commit is contained in:
parent
4c12af957c
commit
a830c27ceb
6 changed files with 175 additions and 72 deletions
|
@ -722,6 +722,20 @@ impl Shape {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_absolute(&self) -> bool {
|
||||
match &self.layout_item {
|
||||
Some(LayoutItem { is_absolute, .. }) => *is_absolute,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn z_index(&self) -> i32 {
|
||||
match &self.layout_item {
|
||||
Some(LayoutItem { z_index, .. }) => *z_index,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_layout_vertical_auto(&self) -> bool {
|
||||
match &self.layout_item {
|
||||
Some(LayoutItem { v_sizing, .. }) => v_sizing == &Sizing::Auto,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue