Hide and show joints in the browser, like other items (#1168)

Fixes #1160.
This commit is contained in:
bherbruck authored and GitHub committed 2026-10-14 15:04:57 -04:00
1 parent e3459edea8
commit 229de1484c
15 files changed
+470 -15

No files matched your search

+6
View File
@@ -176,6 +176,12 @@ impl Session {
Ok(count)
}
/// Whether a joint's glyph is drawn (`browser.visibility`). Hiding a joint only hides its
/// drawing: it still constrains and drives the parts.
pub fn joint_visible(&self, id: u64) -> bool {
!self.visibility.hidden_joints.contains(&id)
}
pub fn body_visible(&self, name: &str) -> bool {
if self.visibility.hidden_bodies.iter().any(|n| n == name) {
return false;