Publish in-progress navigation source and independent canvas reviews

This commit is contained in:
2026-09-12 06:58:08 -07:00
parent 7aa007b077
commit fdf756e6a4
48 changed files with 16281 additions and 125 deletions
+12 -11
View File
@@ -1156,6 +1156,17 @@ struct Line {
label_at: Point,
dashed: bool,
}
impl Line {
fn label_bounds(&self) -> Rectangle {
Rectangle::new(
self.label_at,
Size::new(
(self.label.chars().count() as f32 * 6.8 + 8.).min(225.),
25.,
),
)
}
}
struct Scene {
boxes: Vec<BoxItem>,
lines: Vec<Line>,
@@ -1831,17 +1842,7 @@ impl Scene {
.or_else(|| {
self.lines
.iter()
.find(|line| {
!line.label.is_empty()
&& Rectangle::new(
line.label_at,
Size::new(
(line.label.chars().count() as f32 * 6.8 + 8.).min(225.),
25.,
),
)
.contains(point)
})
.find(|line| !line.label.is_empty() && line.label_bounds().contains(point))
.map(|line| line.id)
})
.or_else(|| self.near_sequence_item(point))