The x position of the control bounds, relative to its container
(&self, x: f32)
| 1419 | |
| 1420 | /// The x position of the control bounds, relative to its container |
| 1421 | fn set_x_local(&self, x: f32) { |
| 1422 | let mut comp = self.as_ref().borrow_mut(); |
| 1423 | |
| 1424 | comp.x_local = x; |
| 1425 | |
| 1426 | if !comp.ignore_spatial { |
| 1427 | comp.ignore_spatial = true; |
| 1428 | match comp.parent { |
| 1429 | Some(parent) => { |
| 1430 | // if let Some(widget) = parent.widget() { |
| 1431 | // comp.x = widget.x() + comp.x_local; |
| 1432 | // } |
| 1433 | } |
| 1434 | None => { |
| 1435 | comp.x = comp.x_local; |
| 1436 | } |
| 1437 | } |
| 1438 | |
| 1439 | comp.ignore_spatial = false; |
| 1440 | } |
| 1441 | } |
| 1442 | |
| 1443 | /// The y position of the control bounds, relative to its container |
| 1444 | fn set_y_local(&self, y: f32) { |
no test coverage detected