Skip to content

Commit 4e02b37

Browse files
committed
format
1 parent 57aab0b commit 4e02b37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

material_maker/panels/graph_edit/graph_edit.gd

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,15 @@ func _gui_input(event) -> void:
291291
remove_theme_color_override("activity")
292292
remove_theme_color_override("connection_hover_tint_color")
293293

294+
294295
func compare_connection_by_port_position_y(a, b) -> bool:
295296
var upper : GraphNode = get_node(NodePath(a.to_node))
296297
var upper_slot_pos: Vector2 = upper.get_input_port_position(a.to_port) + upper.position_offset
297298
var lower : GraphNode = get_node(NodePath(b.to_node))
298299
var lower_slot_pos : Vector2 = lower.get_input_port_position(b.to_port) + lower.position_offset
299300
return upper_slot_pos.y < lower_slot_pos.y
300301

302+
301303
func drop_node_on_connection(node : GraphNode, connection : Dictionary) -> void:
302304
undoredo.start_group()
303305
if node != null:
@@ -322,6 +324,7 @@ func drop_node_on_connection(node : GraphNode, connection : Dictionary) -> void:
322324
break
323325
undoredo.end_group()
324326

327+
325328
func hint_node_drop_allowed(should_allow: bool, force_connection_redraw: bool = true) -> void:
326329
add_theme_color_override("connection_hover_tint_color", Color.TRANSPARENT)
327330
if should_allow:
@@ -331,11 +334,13 @@ func hint_node_drop_allowed(should_allow: bool, force_connection_redraw: bool =
331334
if force_connection_redraw:
332335
get_node("_connection_layer").queue_redraw()
333336

337+
334338
func highlight_connection(connection: Dictionary, amount: float = 0.65) -> void:
335339
if not connection.is_empty():
336340
set_connection_activity(connection.from_node, connection.from_port,
337341
connection.to_node, connection.to_port, amount)
338342

343+
339344
func get_padded_node_rect(graph_node:GraphNode) -> Rect2:
340345
var rect : Rect2 = graph_node.get_global_rect()
341346
var padding := 8 * graph_node.get_global_transform().get_scale().x

0 commit comments

Comments
 (0)