mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-11 13:58:28 +00:00
Fixed connection lines not displaying properly
This commit is contained in:
parent
441f7856ee
commit
45adcf7dc9
@ -156,16 +156,14 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
if let Some((_, ref locator)) = self.connection_in_progress {
|
if let Some((_, ref locator)) = self.connection_in_progress {
|
||||||
let painter = ctx.layer_painter(LayerId::background());
|
|
||||||
let start_pos = port_locations[locator];
|
let start_pos = port_locations[locator];
|
||||||
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 painter = ctx.layer_painter(LayerId::background());
|
|
||||||
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)];
|
||||||
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