From 84d72621e545ba7743e38d46ce1607133bb13461 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Sat, 6 Jul 2024 23:38:25 -0700 Subject: [PATCH] Fix bug causing some node outputs to fail connecting wires to other inputs --- .../document/node_graph/node_graph_message_handler.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs b/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs index 3eed7368..26e76b94 100644 --- a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs +++ b/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs @@ -837,13 +837,10 @@ impl<'a> MessageHandler> for NodeGrap if input_index == 0 { DVec2::new(to_connector_node_position.x as f64 * 24. + 2. * 24., to_connector_node_position.y as f64 * 24. + 2. * 24. + 12.) } else { - DVec2::new(to_connector_node_position.x as f64 * 24. - 2.95, to_connector_node_position.y as f64 * 24. + 24.) + DVec2::new(to_connector_node_position.x as f64 * 24., to_connector_node_position.y as f64 * 24. + 24.) } } else { - DVec2::new( - to_connector_node_position.x as f64 * 24. - 2.95, - to_connector_node_position.y as f64 * 24. + input_index as f64 * 24. + 24., - ) + DVec2::new(to_connector_node_position.x as f64 * 24., to_connector_node_position.y as f64 * 24. + input_index as f64 * 24. + 24.) }; self.wire_in_progress_to_connector = Some((to_connector_position, input_index == 0 && is_layer)); } else if let Some((to_connector_node_position, is_layer, output_index)) = @@ -857,7 +854,7 @@ impl<'a> MessageHandler> for NodeGrap DVec2::new(to_connector_node_position.x as f64 * 24. + 2. * 24., to_connector_node_position.y as f64 * 24. - 12.) } else { DVec2::new( - to_connector_node_position.x as f64 * 24. + 5. * 24. + 2.95, + to_connector_node_position.x as f64 * 24. + 5. * 24., to_connector_node_position.y as f64 * 24. + output_index as f64 * 24. + 24., ) };