tiles: Add panels method. (#1112)
This commit is contained in:
parent
fe8a1e8e9f
commit
163b540681
1 changed files with 4 additions and 0 deletions
|
|
@ -196,6 +196,10 @@ impl Tiles {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn panels(&self) -> &[TileItem] {
|
||||
&self.panels
|
||||
}
|
||||
|
||||
fn sorted_panels(&self) -> Vec<TileItem> {
|
||||
let mut items: Vec<(usize, TileItem)> = self.panels.iter().cloned().enumerate().collect();
|
||||
items.sort_by(|a, b| a.1.z_index.cmp(&b.1.z_index).then_with(|| a.0.cmp(&b.0)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue