Only open the node graph panel after drawing a new frame to avoid layout shift interruption (#924)

* Store drag start as document position

* Don't open graph whilst drawing

* Rename to is_drawing_node_graph_frame

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2022-12-28 13:07:10 -08:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent f51dda5149
commit df74f6f562
10 changed files with 66 additions and 12 deletions
@@ -105,6 +105,9 @@ impl MessageHandler<ToolMessage, (&DocumentMessageHandler, u64, &InputPreprocess
// Notify the frontend about the new active tool to be displayed
tool_data.register_properties(responses, LayoutTarget::ToolShelf);
// Ensure the node graph drawing state is reset
responses.push_back(NodeGraphMessage::SetDrawing { new_drawing: false }.into());
}
ToolMessage::DeactivateTools => {
let tool_data = &mut self.tool_state.tool_data;