diff --git a/scripts/dashboard_grid.gd b/scripts/dashboard_grid.gd index 7e0ddbb..b23a757 100644 --- a/scripts/dashboard_grid.gd +++ b/scripts/dashboard_grid.gd @@ -199,14 +199,9 @@ func _end_drag(mouse_pos: Vector2) -> void: _place_module_in_cell(_drag_module, target_col, target_row) module_placed.emit(_drag_module, target_col, target_row) else: - # INSERT: flatten all modules, insert dragged one at target, reflow - var all_modules := _collect_all_modules() - - var insert_index := target_row * columns + target_col - insert_index = clampi(insert_index, 0, all_modules.size()) - all_modules.insert(insert_index, _drag_module) - - _reflow_modules(all_modules) + # Place in the empty cell directly — you get full control of positioning + _place_module_in_cell(_drag_module, target_col, target_row) + module_placed.emit(_drag_module, target_col, target_row) else: # Dropped outside the grid — return to source if still valid if _is_valid_cell(_drag_source_col, _drag_source_row):