fix node spawn location bug introduced by last fix

This commit is contained in:
nodeSpace 2022-04-15 01:51:00 -04:00 committed by GitHub
parent a473036037
commit 0442d63cb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,8 +130,10 @@ where
node_kind.user_data(), node_kind.user_data(),
|graph, node_id| node_kind.build_node(graph, node_id), |graph, node_id| node_kind.build_node(graph, node_id),
); );
self.node_positions self.node_positions.insert(
.insert(new_node, cursor_pos - self.pan_zoom.pan); new_node,
cursor_pos - self.pan_zoom.pan - editor_rect.min.to_vec2()
);
self.node_order.push(new_node); self.node_order.push(new_node);
should_close_node_finder = true; should_close_node_finder = true;