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

Method apply_depth

src/elements/align.rs:123–133  ·  view source on GitHub ↗
(&self, control: &dyn Element)

Source from the content-addressed store, hash-verified

121 //Internal
122
123 pub fn apply_depth(&self, control: &dyn Element) {
124 let mut state = self.state.borrow_mut();
125 control.set_depth(state.depth_idx + control.depth_offset());
126 state.depth_idx += 1.0;
127
128 for child in control.as_ref().borrow().children.iter() {
129 // if let Some(widget) = child.widget() {
130 // self.apply_depth(widget.as_ref());
131 // }
132 }
133 }
134
135 pub fn sync_depth(&self) {
136 self.state.borrow_mut().depth_idx = 0.0;

Callers 1

sync_depthMethod · 0.45

Calls 3

set_depthMethod · 0.80
depth_offsetMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected