diff --git a/graph_node_renderer/deck_node_renderer_graph_node.gd b/graph_node_renderer/deck_node_renderer_graph_node.gd index e9a93aa..eb6dbe3 100644 --- a/graph_node_renderer/deck_node_renderer_graph_node.gd +++ b/graph_node_renderer/deck_node_renderer_graph_node.gd @@ -17,6 +17,7 @@ func _ready() -> void: node.ports_updated.connect(_on_node_ports_updated) for port in node.get_all_ports(): update_port(port) + position_offset_changed.connect(_on_position_offset_changed) ## Connected to [signal GraphElement.position_offset_updated] and updates the ## [member node]s properties @@ -27,8 +28,11 @@ func _on_position_offset_changed() -> void: ## Connected to [member node]s [signal position_updated] to keep parity with the ## data position. func _on_node_position_updated(new_position: Dictionary) -> void: + position_offset_changed.disconnect(_on_position_offset_changed) position_offset.x = new_position.x position_offset.y = new_position.y + position_offset_changed.connect(_on_position_offset_changed) + print("PO: ", position_offset) ## Connected to [member node]s [signal port_added] handles setting up the specified ## [member Port.descriptor] with it's required nodes/signals etc. + adding the port diff --git a/graph_node_renderer/deck_node_renderer_graph_node.tscn b/graph_node_renderer/deck_node_renderer_graph_node.tscn index ab50a1f..ecd574c 100644 --- a/graph_node_renderer/deck_node_renderer_graph_node.tscn +++ b/graph_node_renderer/deck_node_renderer_graph_node.tscn @@ -9,5 +9,3 @@ offset_bottom = 55.0 resizable = true title = "Deck Node" script = ExtResource("1_pos0w") - -[connection signal="position_offset_changed" from="." to="." method="_on_position_offset_changed"]