统一分离树根节点坐标空间
子节点收集复用根节点实际解析矩形
This commit is contained in:
@@ -100,9 +100,10 @@ pub fn construct_separation_state(state: &State) -> SeparationState {
|
||||
let size = image.pixel_size / ppu;
|
||||
let root_rect =
|
||||
crate::ui_editor::layout::dimension::UIRect::new(nalgebra::Point2::origin(), size);
|
||||
let root_resolved = tree.root.layout.transform.resolve(&root_rect);
|
||||
let mut children = Vec::new();
|
||||
for child in &tree.root.children {
|
||||
collect_todo_nodes(child, &root_rect, ppu, &mut children);
|
||||
collect_todo_nodes(child, &root_resolved, ppu, &mut children);
|
||||
}
|
||||
let root_extractable = is_unbound_image(&tree.root);
|
||||
if !root_extractable && children.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user