fix group node not considering y on renderer when creating

This commit is contained in:
Lera Elvoé 2023-11-29 08:54:36 +03:00
parent c283f35936
commit 292e7be799
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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"]