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

Method set_h

src/elements/element.rs:1397–1418  ·  view source on GitHub ↗

The height of the control bounds

(&self, h: f32)

Source from the content-addressed store, hash-verified

1395
1396 /// The height of the control bounds
1397 fn set_h(&self, h: f32) {
1398 // log::info!("Set Height Deault Impl {}", h);
1399 let dh = {
1400 let mut comp = self.as_ref().borrow_mut();
1401
1402 let mut h = if h < comp.h_min { comp.h_min } else { h };
1403
1404 h = if h > comp.h_max && comp.h_max != 0.0 {
1405 comp.h_max
1406 } else {
1407 h
1408 };
1409
1410 let dh = h - comp.h;
1411
1412 comp.h = h;
1413
1414 dh
1415 };
1416
1417 self.bounds_changed(0.0, 0.0, 0.0, dh);
1418 }
1419
1420 /// The x position of the control bounds, relative to its container
1421 fn set_x_local(&self, x: f32) {

Callers 3

on_collapseMethod · 0.80
update_containerMethod · 0.80
update_containerMethod · 0.80

Implementers 15

transform.rssrc/elements/transform.rs
media_query.rssrc/elements/media_query.rs
navigation_toolbar.rssrc/elements/navigation_toolbar.rs
calendar_date_picker.rssrc/elements/calendar_date_picker.rs
custom_scroll_view.rssrc/elements/custom_scroll_view.rs
preferred_size.rssrc/elements/preferred_size.rs
rust_logo.rssrc/elements/rust_logo.rs
panel.rssrc/elements/panel.rs
single_child_scroll_view.rssrc/elements/single_child_scroll_view.
choice_chip.rssrc/elements/choice_chip.rs
tab_page_selector.rssrc/elements/tab_page_selector.rs
align.rssrc/elements/align.rs

Calls 2

as_refMethod · 0.45
bounds_changedMethod · 0.45

Tested by

no test coverage detected