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

Method relayout

src/elements/dropdown_button.rs:218–240  ·  view source on GitHub ↗
(&self, origin: Point2<f32>)

Source from the content-addressed store, hash-verified

216 }
217
218 fn relayout(&self, origin: Point2<f32>) {
219 let update_childs = match LayoutSystem::layout(self.node) {
220 Ok(layout) => {
221 let mut comp = self.as_ref().borrow_mut();
222 comp.x = layout.location.x + origin.x;
223 comp.y = layout.location.y + origin.y;
224 comp.w = layout.size.width;
225 comp.h = layout.size.height;
226
227 true
228 }
229 Err(e) => {
230 log::error!("{}", e);
231 false
232 }
233 };
234
235 if update_childs {
236 // self.leading.relayout();
237 // self.title.relayout();
238 // self.flexible_space.relayout();
239 }
240 }
241}

Callers

nothing calls this directly

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected