_dx: f32 =0.0, _dy: f32 =0.0, _dw: f32 =0.0, _dh: f32 =0.0
(&self, dx: f32, dy: f32, dw: f32, dh: f32)
| 1117 | |
| 1118 | // _dx: f32 =0.0, _dy: f32 =0.0, _dw: f32 =0.0, _dh: f32 =0.0 |
| 1119 | fn bounds_changed(&self, dx: f32, dy: f32, dw: f32, dh: f32) { |
| 1120 | let mut comp = self.as_ref().borrow_mut(); |
| 1121 | |
| 1122 | assert!( |
| 1123 | !comp.destroyed, |
| 1124 | "Widget was already destroyed but is being interacted with" |
| 1125 | ); |
| 1126 | |
| 1127 | if comp.updating { |
| 1128 | return; |
| 1129 | } |
| 1130 | |
| 1131 | // manual relayout of childs |
| 1132 | // we dont need it more coz we use flexbox |
| 1133 | // if dx != 0.0 || dy != 0.0 { |
| 1134 | // for child in comp.children.iter() { |
| 1135 | // if let Some(widget) = child.widget() { |
| 1136 | // widget.set_pos(widget.x() + dx, widget.y() + dy); |
| 1137 | // } |
| 1138 | // } |
| 1139 | // } |
| 1140 | |
| 1141 | if comp.onbounds.is_some() { |
| 1142 | let _ = comp.onbounds.get().try_send(()); |
| 1143 | } |
| 1144 | } |
| 1145 | |
| 1146 | //Properties |
| 1147 |
no test coverage detected