Fix arrow scaling when zooming

This commit is contained in:
Sebastian Morr 2020-09-21 20:06:09 +02:00
parent 176a069a6a
commit 4f3c279b5e
2 changed files with 1 additions and 2 deletions

View file

@ -18,7 +18,7 @@ func _process(_delta):
if $Target.text.substr(0, 5) != "refs/": if $Target.text.substr(0, 5) != "refs/":
$Target.text = ""#$Target.text.substr(0,8) $Target.text = ""#$Target.text.substr(0,8)
$Target.show() $Target.show()
$Line.points[1] = end - global_position $Line.points[1] = (end - global_position)/repository.find_node("Nodes").rect_scale.x
$Label.position = ($Line.points[0] + $Line.points[1])/1.3 $Label.position = ($Line.points[0] + $Line.points[1])/1.3
$Tip.position = ($Line.points[0] + $Line.points[1])/1.3 $Tip.position = ($Line.points[0] + $Line.points[1])/1.3
$Tip.rotation = PI+$Line.points[0].angle_to($Line.points[1]) $Tip.rotation = PI+$Line.points[0].angle_to($Line.points[1])

View file

@ -47,7 +47,6 @@ __meta__ = {
} }
[node name="Target" type="Label" parent="."] [node name="Target" type="Label" parent="."]
visible = false
margin_left = -229.024 margin_left = -229.024
margin_top = 63.3118 margin_top = 63.3118
margin_right = 232.976 margin_right = 232.976