Minor UI tweaking

Fix some wrapping issues with long ID descriptions
This commit is contained in:
hppeng 2022-01-06 11:18:44 -08:00
parent f292b3d4a9
commit 839620b8ba
4 changed files with 628 additions and 627 deletions

View file

@ -425,11 +425,11 @@ input.equipment-input {
} }
.dark-shadow { .dark-shadow {
box-shadow: 0rem 0rem 1.25rem 0.1875rem black; box-shadow: 0rem 0rem 0.5rem 0.075rem black;
} }
.dark-shadow-sm { .dark-shadow-sm {
box-shadow: 0rem 0rem 0.625rem 0.125rem black; box-shadow: 0rem 0rem 0.25rem 0.05rem black;
} }
.border-dark-7 { .border-dark-7 {

1236
sq2bs.html

File diff suppressed because it is too large Load diff

View file

@ -740,9 +740,9 @@ function calculateBuildStats() {
} }
for (let i in player_build.items) { for (let i in player_build.items) {
if (player_build.items[i].get("id") > 9999) { // if (player_build.items[i].get("id") > 9999) {
continue; // continue;
} // }
displaysq2ExpandedItem(player_build.items[i], buildFields[i]); displaysq2ExpandedItem(player_build.items[i], buildFields[i]);
collapse_element("#"+equipment_keys[i]+"-tooltip"); collapse_element("#"+equipment_keys[i]+"-tooltip");
} }

View file

@ -462,6 +462,7 @@ function displaysq2RolledID(item, id, elemental_format) {
let min_elem = document.createElement('div'); let min_elem = document.createElement('div');
min_elem.classList.add('col', 'text-start'); min_elem.classList.add('col', 'text-start');
min_elem.style.cssText += "flex-grow: 0";
let id_min = item.get("minRolls").get(id) let id_min = item.get("minRolls").get(id)
let style = id_min < 0 ? "negative" : "positive"; let style = id_min < 0 ? "negative" : "positive";
if(reversedIDs.includes(id)){ if(reversedIDs.includes(id)){
@ -472,7 +473,8 @@ function displaysq2RolledID(item, id, elemental_format) {
item_div.appendChild(min_elem); item_div.appendChild(min_elem);
let desc_elem = document.createElement('div'); let desc_elem = document.createElement('div');
desc_elem.classList.add('col', 'text-center', 'text-nowrap'); desc_elem.classList.add('col', 'text-center');//, 'text-nowrap');
desc_elem.style.cssText += "flex-grow: 1";
//TODO elemental format jank //TODO elemental format jank
if (elemental_format) { if (elemental_format) {
apply_sq2_elemental_format(desc_elem, id); apply_sq2_elemental_format(desc_elem, id);
@ -485,8 +487,9 @@ function displaysq2RolledID(item, id, elemental_format) {
let max_elem = document.createElement('div'); let max_elem = document.createElement('div');
let id_max = item.get("maxRolls").get(id) let id_max = item.get("maxRolls").get(id)
max_elem.classList.add('col', 'text-end'); max_elem.classList.add('col', 'text-end');
max_elem.style.cssText += "flex-grow: 0";
style = id_max < 0 ? "negative" : "positive"; style = id_max < 0 ? "negative" : "positive";
if(reversedIDs.includes(id)){ if (reversedIDs.includes(id)) {
style === "positive" ? style = "negative" : style = "positive"; style === "positive" ? style = "negative" : style = "positive";
} }
max_elem.classList.add(style); max_elem.classList.add(style);
@ -1465,4 +1468,4 @@ function displaysq2SetBonuses(parent_id,build) {
displaysq2ExpandedItem(mock_item, set_elem.id); displaysq2ExpandedItem(mock_item, set_elem.id);
console.log(mock_item); console.log(mock_item);
} }
} }