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

Method open_list

src/elements/dropdown_button.rs:140–155  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

138 }
139
140 pub fn open_list(&self) {
141 self.list.set_visible(true);
142
143 //bring above everything
144 let component = self.component.borrow();
145 if let Some(canvas) = component.canvas.as_ref() {
146 canvas.bring_to_front(&self.list);
147 }
148 //move to absolute space
149 self.list.set_x(self.x());
150 self.list.set_y(self.y() + self.h() + 1.0);
151
152 self.list.capture();
153
154 self.state.borrow_mut().is_open = true;
155 }
156}
157
158impl AsRef<RefCell<WidgetComponent>> for DropdownButtonElement {

Callers 1

mousedownMethod · 0.80

Calls 9

set_xMethod · 0.80
set_yMethod · 0.80
captureMethod · 0.80
set_visibleMethod · 0.45
as_refMethod · 0.45
bring_to_frontMethod · 0.45
xMethod · 0.45
yMethod · 0.45
hMethod · 0.45

Tested by

no test coverage detected