diff --git a/public/css/building.css b/public/css/building.css index fcefd3b..bd391be 100644 --- a/public/css/building.css +++ b/public/css/building.css @@ -392,8 +392,6 @@ body { padding: 10px; max-height: 340px; - - overflow-y: auto; } #inventory-wrapper { @@ -402,8 +400,6 @@ body { margin: 0 auto; max-height: 340px; - - overflow-y: auto; } .inventory-slot { diff --git a/public/js/buildings/wohnhaus.js b/public/js/buildings/wohnhaus.js index 93a126e..374e5eb 100644 --- a/public/js/buildings/wohnhaus.js +++ b/public/js/buildings/wohnhaus.js @@ -202,7 +202,15 @@ function initDrop() { icon = inventoryItem.querySelector("img").src; - inventoryItem.remove(); + /* Slot leeren statt löschen */ + + inventoryItem.classList.add("empty"); + + inventoryItem.removeAttribute("data-id"); + inventoryItem.removeAttribute("data-level"); + inventoryItem.removeAttribute("data-slot"); + + inventoryItem.innerHTML = ""; } else { const slotItem = document.querySelector( '.slot[data-slot="' + itemSlot + '"] img',