TierListMaker:修订间差异
来自卡厄思梦境WIKI
无编辑摘要 |
无编辑摘要 |
||
| 第34行: | 第34行: | ||
.tierlist-controls { | .tierlist-controls { | ||
margin-bottom: | margin-bottom: 3px; | ||
display: flex; | display: flex; | ||
gap: 10px; | gap: 10px; | ||
| 第105行: | 第105行: | ||
} | } | ||
.tier-header.editable { | .tier-header.editable { | ||
cursor: pointer; | cursor: pointer; | ||
| 第144行: | 第143行: | ||
} | } | ||
.color-picker-popup { | .color-picker-popup { | ||
position: fixed; | position: fixed; | ||
| 第326行: | 第324行: | ||
if (this.draggedElement && this.draggedElement.parentElement !== element) { | if (this.draggedElement && this.draggedElement.parentElement !== element) { | ||
// 从原位置移除 | // 确保只移动avatar-frame元素 | ||
if (this.draggedElement.classList.contains('avatar-frame')) { | |||
// 从原位置移除 | |||
if (this.draggedElement.parentElement) { | |||
this.draggedElement.parentElement.removeChild(this.draggedElement); | |||
} | |||
// 添加到新位置 | |||
element.appendChild(this.draggedElement); | |||
// 确保图片透明度正常 | |||
const img = this.draggedElement.querySelector('img'); | |||
if (img) { | |||
img.style.opacity = '1'; | |||
} | |||
} | } | ||
} | } | ||
| 第543行: | 第544行: | ||
const tierRow = row.querySelector('.tier-row'); | const tierRow = row.querySelector('.tier-row'); | ||
const pool = document.getElementById('character-pool'); | const pool = document.getElementById('character-pool'); | ||
// | // 只移动avatar-frame元素 | ||
avatars.forEach(avatar => { | if (tierRow) { | ||
const avatars = tierRow.querySelectorAll('.avatar-frame'); | |||
avatars.forEach(avatar => { | |||
pool.appendChild(avatar); | |||
}); | |||
} | |||
// 删除行 | // 删除行 | ||
| 第765行: | 第768行: | ||
} | } | ||
const | // 只选择tier-row中的avatar-frame元素 | ||
const tierRows = document.querySelectorAll('.tier-row'); | |||
tierRows.forEach(row => { | |||
row. | const avatars = row.querySelectorAll('.avatar-frame'); | ||
avatars.forEach(avatar => { | |||
pool.appendChild(avatar); | |||
const img = avatar.querySelector('img'); | |||
if (img) { | |||
img.style.opacity = '1'; | |||
} | |||
}); | |||
} | |||
}); | }); | ||