mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-22 19:18:30 +00:00
Cargo fmt
This commit is contained in:
parent
42bd98e9ed
commit
d290adfefa
@ -130,7 +130,7 @@ where
|
|||||||
);
|
);
|
||||||
self.node_positions.insert(
|
self.node_positions.insert(
|
||||||
new_node,
|
new_node,
|
||||||
cursor_pos - self.pan_zoom.pan - editor_rect.min.to_vec2()
|
cursor_pos - self.pan_zoom.pan - editor_rect.min.to_vec2(),
|
||||||
);
|
);
|
||||||
self.node_order.push(new_node);
|
self.node_order.push(new_node);
|
||||||
|
|
||||||
@ -157,13 +157,15 @@ where
|
|||||||
|
|
||||||
if let Some((_, ref locator)) = self.connection_in_progress {
|
if let Some((_, ref locator)) = self.connection_in_progress {
|
||||||
let start_pos = port_locations[locator];
|
let start_pos = port_locations[locator];
|
||||||
ui.painter().line_segment([start_pos, cursor_pos], connection_stroke)
|
ui.painter()
|
||||||
|
.line_segment([start_pos, cursor_pos], connection_stroke)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (input, output) in self.graph.iter_connections() {
|
for (input, output) in self.graph.iter_connections() {
|
||||||
let src_pos = port_locations[&AnyParameterId::Output(output)];
|
let src_pos = port_locations[&AnyParameterId::Output(output)];
|
||||||
let dst_pos = port_locations[&AnyParameterId::Input(input)];
|
let dst_pos = port_locations[&AnyParameterId::Input(input)];
|
||||||
ui.painter().line_segment([src_pos, dst_pos], connection_stroke);
|
ui.painter()
|
||||||
|
.line_segment([src_pos, dst_pos], connection_stroke);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle responses from drawing nodes */
|
/* Handle responses from drawing nodes */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user