Closed piaoger closed 1 year ago
Thanks for reporting.
Resizing is not really cleaning the document, more like nodes just going out from viewport.
I am not exactly sure how tackle it for now, so any ideas/help are welcome.
There is a function that called on resize: https://github.com/StaffEngineer/velo/blob/main/src/ui_plugin/systems/resize_window.rs
Position of nodes updated in https://github.com/StaffEngineer/velo/blob/main/src/ui_plugin/systems/update_rectangle_position.rs by setting left
and bottom
values.
Resizing is not really cleaning the document, more like nodes just going out from viewport. Yes, what I mean "clean" is just not in viewport anymore. Can you reproduce it? I tried velo a couple of days again and it works fine.
My environment is Window 11. Please let know if know need more information. @StaffEngineer
I just commented out the lines about insert_resource and it works fine, though still not sure why inserting a new one here :) @StaffEngineer
if let Some(active_tab) = current_doc.tabs.iter().find(|t| t.is_active) {
// commands.insert_resource(LoadTabRequest {
// doc_id: current_doc.id,
// tab_id: active_tab.id,
// drop_last_checkpoint: false,
// });
}
@piaoger interesting.
I think this code was added for fixing arrow positions on wasm. If you comment code and run velo in browser and resize window I think position of arrows gonna be broken? If commenting code fixes the issue with disappearing nodes maybe we have to revisit approach how arrows on wasm was fixed and find another way.
@piaoger this should be fixed by https://github.com/StaffEngineer/velo/pull/153, please re-open the issue if not.
How to reproduce: