MCPcopy Create free account
hub / github.com/angular-rust/ux-components / relayout

Method relayout

src/elements/window.rs:480–502  ·  view source on GitHub ↗
(&self, origin: Point2<f32>)

Source from the content-addressed store, hash-verified

478 }
479
480 fn relayout(&self, origin: Point2<f32>) {
481 let update_childs = match LayoutSystem::layout(self.node) {
482 Ok(layout) => {
483 let mut comp = self.as_ref().borrow_mut();
484 comp.x = layout.location.x + origin.x;
485 comp.y = layout.location.y + origin.y;
486 comp.w = layout.size.width;
487 comp.h = layout.size.height;
488
489 true
490 }
491 Err(e) => {
492 log::error!("{}", e);
493 false
494 }
495 };
496
497 if update_childs {
498 // self.leading.relayout();
499 // self.title.relayout();
500 // self.flexible_space.relayout();
501 }
502 }
503}

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected