Skip to content

Commit

Permalink
Add transform node
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgerhant authored and Keavon committed Oct 30, 2024
1 parent abf3f1b commit a72a8e0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions editor/src/messages/tool/tool_messages/pen_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,21 @@ impl Fsm for PenToolFsmState {
node_id: path_node_id,
parent: current_layer,
});

// Add a transform node to ensure correct tooling modifications
let transform_node_id = NodeId::new();
let transform_node = document_node_definitions::resolve_document_node_type("Transform")
.expect("Failed to create transform node")
.default_node_template();
responses.add(NodeGraphMessage::InsertNode {
node_id: transform_node_id,
node_template: transform_node,
});
responses.add(NodeGraphMessage::MoveNodeToChainStart {
node_id: transform_node_id,
parent: current_layer,
});

responses.add(NodeGraphMessage::RunDocumentGraph);
responses.add(Message::StartBuffer);
responses.add(PenToolMessage::RecalculateLatestPointsPosition);
Expand Down

0 comments on commit a72a8e0

Please sign in to comment.