Add direct diagram connections, movable ports, and contextual authoring
This commit is contained in:
@@ -136,7 +136,10 @@ pub fn sidebar(app: &App) -> View<'_, Message> {
|
||||
.style(style::card),
|
||||
tooltip::Position::Right,
|
||||
));
|
||||
content = content.push(outline);
|
||||
let id = entry.id;
|
||||
content = content.push(crate::context_menu::Area::new(outline, move |anchor| {
|
||||
crate::model_menu::open(id, anchor)
|
||||
}));
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
@@ -202,27 +205,30 @@ fn item<'a>(app: &'a App, id: Id, context: bool) -> View<'a, Message> {
|
||||
info = info.push(label(path));
|
||||
}
|
||||
}
|
||||
button(
|
||||
row![
|
||||
info.width(Fill),
|
||||
label(if count == 0 {
|
||||
"Details".into()
|
||||
} else {
|
||||
format!("{count} children")
|
||||
}),
|
||||
text("›").size(20)
|
||||
]
|
||||
.spacing(8)
|
||||
.align_y(iced::Center),
|
||||
crate::context_menu::Area::new(
|
||||
button(
|
||||
row![
|
||||
info.width(Fill),
|
||||
label(if count == 0 {
|
||||
"Details".into()
|
||||
} else {
|
||||
format!("{count} children")
|
||||
}),
|
||||
text("›").size(20)
|
||||
]
|
||||
.spacing(8)
|
||||
.align_y(iced::Center),
|
||||
)
|
||||
.width(Fill)
|
||||
.padding(12)
|
||||
.on_press(Message::Explore(Some(id)))
|
||||
.style(if app.selected == id {
|
||||
style::selected
|
||||
} else {
|
||||
style::nav
|
||||
}),
|
||||
move |anchor| crate::model_menu::open(id, anchor),
|
||||
)
|
||||
.width(Fill)
|
||||
.padding(12)
|
||||
.on_press(Message::Explore(Some(id)))
|
||||
.style(if app.selected == id {
|
||||
style::selected
|
||||
} else {
|
||||
style::nav
|
||||
})
|
||||
.into()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user