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

Method relayout

src/elements/container.rs:350–372  ·  view source on GitHub ↗
(&self, origin: Point2<f32>)

Source from the content-addressed store, hash-verified

348 }
349
350 fn relayout(&self, origin: Point2<f32>) {
351 let update_childs = match LayoutSystem::layout(self.node) {
352 Ok(layout) => {
353 let mut comp = self.as_ref().borrow_mut();
354 comp.x = layout.location.x + origin.x;
355 comp.y = layout.location.y + origin.y;
356 comp.w = layout.size.width;
357 comp.h = layout.size.height;
358
359 true
360 }
361 Err(e) => {
362 log::error!("{}", e);
363 false
364 }
365 };
366
367 if update_childs {
368 // self.leading.relayout();
369 // self.title.relayout();
370 // self.flexible_space.relayout();
371 }
372 }
373}

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected