Skip to content

Commit

Permalink
Stop graph editing when in full-screen visualization mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Procrat committed May 25, 2023
1 parent b33ae47 commit 98ae1b6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@
it robust against project name changes.
- [Added a button to return from an opened project back to the project
dashboard.][6474]
- [Keyboard shortcuts for graph editing are now disabled when the full-screen
visualization is active.][6844]

[6279]: https://github.com/enso-org/enso/pull/6279
[6421]: https://github.com/enso-org/enso/pull/6421
Expand All @@ -184,6 +186,7 @@
[6752]: https://github.com/enso-org/enso/pull/6752
[6719]: https://github.com/enso-org/enso/pull/6719
[6474]: https://github.com/enso-org/enso/pull/6474
[6844]: https://github.com/enso-org/enso/pull/6844

#### EnsoGL (rendering engine)

Expand Down
39 changes: 32 additions & 7 deletions app/gui/view/graph-editor/src/shortcuts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,35 @@ use ensogl::application::shortcut::ActionType::*;

/// The list of all shortcuts used in the graph editor.
pub const SHORTCUTS: &[(ensogl::application::shortcut::ActionType, &str, &str, &str)] = &[
(Press, "!node_editing & !read_only", "tab", "start_node_creation"),
(Press, "!node_editing & !read_only", "enter", "start_node_creation"),
(
Press,
"!node_editing & !read_only & !is_fs_visualization_displayed",
"tab",
"start_node_creation",
),
(
Press,
"!node_editing & !read_only & !is_fs_visualization_displayed",
"enter",
"start_node_creation",
),
// === Drag ===
(Press, "", "left-mouse-button", "node_press"),
(Release, "", "left-mouse-button", "node_release"),
(Press, "!node_editing & !read_only", "backspace", "remove_selected_nodes"),
(Press, "!node_editing & !read_only", "delete", "remove_selected_nodes"),
(
Press,
"!node_editing & !read_only & !is_fs_visualization_displayed",
"backspace",
"remove_selected_nodes",
),
(
Press,
"!node_editing & !read_only & !is_fs_visualization_displayed",
"delete",
"remove_selected_nodes",
),
(Press, "has_detached_edge", "escape", "drop_dragged_edge"),
(Press, "!read_only", "cmd g", "collapse_selected_nodes"),
(Press, "!read_only & !is_fs_visualization_displayed", "cmd g", "collapse_selected_nodes"),
// === Visualization ===
(Press, "!node_editing", "space", "press_visualization_visibility"),
(
Expand Down Expand Up @@ -54,8 +74,13 @@ pub const SHORTCUTS: &[(ensogl::application::shortcut::ActionType, &str, &str, &
(DoublePress, "!read_only", "left-mouse-button", "enter_hovered_node"),
(DoublePress, "!read_only", "left-mouse-button", "start_node_creation_from_port"),
(Press, "!read_only", "right-mouse-button", "start_node_creation_from_port"),
(Press, "!node_editing & !read_only", "cmd enter", "enter_selected_node"),
(Press, "!read_only", "alt enter", "exit_node"),
(
Press,
"!node_editing & !read_only & !is_fs_visualization_displayed",
"cmd enter",
"enter_selected_node",
),
(Press, "!read_only & !is_fs_visualization_displayed", "alt enter", "exit_node"),
// === Node Editing ===
(Press, "!read_only", "cmd", "edit_mode_on"),
(Release, "!read_only", "cmd", "edit_mode_off"),
Expand Down

0 comments on commit 98ae1b6

Please sign in to comment.