Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
blitzarx1 committed Nov 7, 2023
1 parent e893ec3 commit 0c23cb7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
4 changes: 3 additions & 1 deletion examples/configurable/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,9 @@ impl App for ConfigurableApp {
egui::CentralPanel::default().show(ctx, |ui| {
let settings_interaction = &egui_graphs::SettingsInteraction::new()
.with_node_selection_enabled(self.settings_interaction.selection_enabled)
.with_node_selection_multi_enabled(self.settings_interaction.selection_multi_enabled)
.with_node_selection_multi_enabled(
self.settings_interaction.selection_multi_enabled,
)
.with_dragging_enabled(self.settings_interaction.dragging_enabled)
.with_node_clicking_enabled(self.settings_interaction.clicking_enabled);
let settings_navigation = &egui_graphs::SettingsNavigation::new()
Expand Down
4 changes: 1 addition & 3 deletions examples/custom_draw/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use eframe::{run_native, App, CreationContext};
use egui::{
epaint::TextShape, Context, FontFamily, FontId, Rect, Rounding, Shape, Stroke, Vec2,
};
use egui::{epaint::TextShape, Context, FontFamily, FontId, Rect, Rounding, Shape, Stroke, Vec2};
use egui_graphs::{default_edges_draw, Graph, GraphView, SettingsInteraction};
use petgraph::{stable_graph::StableGraph, Directed};

Expand Down
2 changes: 1 addition & 1 deletion src/computed.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use egui::{Rect, Vec2};
use petgraph::{stable_graph::NodeIndex, EdgeType};
use petgraph::graph::EdgeIndex;
use petgraph::{stable_graph::NodeIndex, EdgeType};

use crate::{Graph, Node, SettingsStyle};

Expand Down
2 changes: 1 addition & 1 deletion src/elements/edge.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use egui::{Color32, Context};
use super::StyleEdge;
use egui::{Color32, Context};

/// Stores properties of an edge that can be changed. Used to apply changes to the graph.
#[derive(Clone, Debug)]
Expand Down
6 changes: 3 additions & 3 deletions src/events/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod event;

pub use self::event::{
Event, PayloadNodeClick, PayloadNodeDeselect, PayloadNodeDoubleClick, PayloadNodeDragEnd,
PayloadNodeDragStart, PayloadNodeMove, PayloadNodeSelect, PayloadPan, PayloadZoom, PayloadEdgeClick,
PayloadEdgeSelect, PayloadEdgeDeselect,
Event, PayloadEdgeClick, PayloadEdgeDeselect, PayloadEdgeSelect, PayloadNodeClick,
PayloadNodeDeselect, PayloadNodeDoubleClick, PayloadNodeDragEnd, PayloadNodeDragStart,
PayloadNodeMove, PayloadNodeSelect, PayloadPan, PayloadZoom,
};
6 changes: 3 additions & 3 deletions src/graph_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ impl<'a, N: Clone, E: Clone, Ty: EdgeType> GraphView<'a, N, E, Ty> {
resp.hover_pos().unwrap(),
edge_map,
);
let found_node = self
.g
.node_by_screen_pos(meta, &self.settings_style, resp.hover_pos().unwrap());
let found_node =
self.g
.node_by_screen_pos(meta, &self.settings_style, resp.hover_pos().unwrap());
if found_node.is_none() && found_edge.is_none() {
// click on empty space
let nodes_selectable = self.settings_interaction.node_selection_enabled
Expand Down
1 change: 0 additions & 1 deletion src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ impl SettingsInteraction {
self
}


/// Allows clicking on edges.
///
/// Default: `false`
Expand Down

0 comments on commit 0c23cb7

Please sign in to comment.