fix: make the linter happy
This commit is contained in:
parent
a1892d4411
commit
bf9066ae2e
@ -355,7 +355,7 @@ class ControlsWaiter {
|
|||||||
icon.setAttribute("hide-args", "true");
|
icon.setAttribute("hide-args", "true");
|
||||||
icon.setAttribute("data-original-title", "Show arguments");
|
icon.setAttribute("data-original-title", "Show arguments");
|
||||||
icon.children[0].innerText = "keyboard_arrow_down";
|
icon.children[0].innerText = "keyboard_arrow_down";
|
||||||
Array.from(document.getElementsByClassName("hide-args-icon")).forEach(function(item){
|
Array.from(document.getElementsByClassName("hide-args-icon")).forEach(function(item) {
|
||||||
item.setAttribute("hide-args", "true");
|
item.setAttribute("hide-args", "true");
|
||||||
item.innerText = "keyboard_arrow_down";
|
item.innerText = "keyboard_arrow_down";
|
||||||
item.classList.add("hide-args-selected");
|
item.classList.add("hide-args-selected");
|
||||||
@ -365,7 +365,7 @@ class ControlsWaiter {
|
|||||||
icon.setAttribute("hide-args", "false");
|
icon.setAttribute("hide-args", "false");
|
||||||
icon.setAttribute("data-original-title", "Hide arguments");
|
icon.setAttribute("data-original-title", "Hide arguments");
|
||||||
icon.children[0].innerText = "keyboard_arrow_up";
|
icon.children[0].innerText = "keyboard_arrow_up";
|
||||||
Array.from(document.getElementsByClassName("hide-args-icon")).forEach(function(item){
|
Array.from(document.getElementsByClassName("hide-args-icon")).forEach(function(item) {
|
||||||
item.setAttribute("hide-args", "false");
|
item.setAttribute("hide-args", "false");
|
||||||
item.innerText = "keyboard_arrow_up";
|
item.innerText = "keyboard_arrow_up";
|
||||||
item.classList.remove("hide-args-selected");
|
item.classList.remove("hide-args-selected");
|
||||||
|
@ -243,14 +243,12 @@ class RecipeWaiter {
|
|||||||
const uniqueIcons = icons.map(function(item) {
|
const uniqueIcons = icons.map(function(item) {
|
||||||
return item.getAttribute("hide-args");
|
return item.getAttribute("hide-args");
|
||||||
}).unique();
|
}).unique();
|
||||||
console.log(uniqueIcons)
|
|
||||||
|
|
||||||
const controlsIconStatus = document.getElementById("hide-icon").getAttribute("hide-args");
|
const controlsIconStatus = document.getElementById("hide-icon").getAttribute("hide-args");
|
||||||
console.log(controlsIconStatus)
|
|
||||||
|
|
||||||
// If all icons are in the same state and the global icon isn't, fix it
|
// If all icons are in the same state and the global icon isn't, fix it
|
||||||
if (uniqueIcons.length === 1 && icon.getAttribute("hide-args") !== controlsIconStatus) {
|
if (uniqueIcons.length === 1 && icon.getAttribute("hide-args") !== controlsIconStatus) {
|
||||||
this.manager.controls.hideRecipeArgsClick()
|
this.manager.controls.hideRecipeArgsClick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user