[WebHost] weighted-settings: Minor style fixes
This commit is contained in:
parent
240d1423a3
commit
ee190601ee
|
@ -600,6 +600,9 @@ const buildItemQtyDiv = (game, item) => {
|
||||||
itemQtyDiv.setAttribute('draggable', 'true');
|
itemQtyDiv.setAttribute('draggable', 'true');
|
||||||
itemQtyDiv.innerText = item;
|
itemQtyDiv.innerText = item;
|
||||||
|
|
||||||
|
const inputWrapper = document.createElement('div');
|
||||||
|
inputWrapper.classList.add('item-qty-input-wrapper')
|
||||||
|
|
||||||
const itemQty = document.createElement('input');
|
const itemQty = document.createElement('input');
|
||||||
itemQty.setAttribute('value', currentSettings[game].start_inventory.hasOwnProperty(item) ?
|
itemQty.setAttribute('value', currentSettings[game].start_inventory.hasOwnProperty(item) ?
|
||||||
currentSettings[game].start_inventory[item] : '1');
|
currentSettings[game].start_inventory[item] : '1');
|
||||||
|
@ -611,7 +614,8 @@ const buildItemQtyDiv = (game, item) => {
|
||||||
evt.target.value = isNaN(parseInt(evt.target.value)) ? 0 : parseInt(evt.target.value);
|
evt.target.value = isNaN(parseInt(evt.target.value)) ? 0 : parseInt(evt.target.value);
|
||||||
updateItemSetting(evt);
|
updateItemSetting(evt);
|
||||||
});
|
});
|
||||||
itemQtyDiv.appendChild(itemQty);
|
inputWrapper.appendChild(itemQty);
|
||||||
|
itemQtyDiv.appendChild(inputWrapper);
|
||||||
|
|
||||||
itemQtyDiv.addEventListener('dragstart', (evt) => {
|
itemQtyDiv.addEventListener('dragstart', (evt) => {
|
||||||
evt.dataTransfer.setData('text/plain', itemQtyDiv.getAttribute('id'));
|
evt.dataTransfer.setData('text/plain', itemQtyDiv.getAttribute('id'));
|
||||||
|
|
|
@ -133,6 +133,12 @@ html{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#weighted-settings .item-container .item-qty-div .item-qty-input-wrapper{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
#weighted-settings .item-container .item-qty-div input{
|
#weighted-settings .item-container .item-qty-div input{
|
||||||
min-width: unset;
|
min-width: unset;
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
|
@ -166,6 +172,8 @@ html{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#weighted-settings .hints-div .hints-wrapper .hint-div:hover{
|
#weighted-settings .hints-div .hints-wrapper .hint-div:hover{
|
||||||
|
|
Loading…
Reference in New Issue