Updated link to make it child of graph_edit control

Should fix problems under Linux
This commit is contained in:
RodZill4 2018-09-11 21:43:40 +02:00
parent 4a504b0bb5
commit e4aebb9b1f
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ func _ready():
func clip(p, s):
clip_pos = p
rect_global_position = p
rect_global_position = Vector2(0, 0)
rect_size = s
rect_clip_content = true

View File

@ -62,7 +62,7 @@ func _on_mouse_entered():
link.clip(graph_edit.rect_global_position, graph_edit.rect_size)
link.source = self
link.target = w.widget
viewport.add_child(link)
graph_edit.add_child(link)
links.append(link)
func _on_mouse_exited():
@ -124,7 +124,7 @@ func pick_linked():
link.clip(graph_edit.rect_global_position, graph_edit.rect_size)
link.source = self
link.end = rect_global_position+0.5*rect_size*get_global_transform().get_scale()
viewport.add_child(link)
graph_edit.add_child(link)
set_process_input(true)
pointed_control = null