From 29eaf84ec61a868710d71b682b561ad77c439484 Mon Sep 17 00:00:00 2001 From: AlexL Date: Mon, 11 Dec 2023 22:42:19 +0100 Subject: [PATCH] Slider visibility corrected --- js/ui/tool/dream.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/js/ui/tool/dream.js b/js/ui/tool/dream.js index 2ca6c76..c3268bb 100644 --- a/js/ui/tool/dream.js +++ b/js/ui/tool/dream.js @@ -2015,12 +2015,12 @@ const dreamTool = () => state.ctxmenu.keepUnmaskedBlurSlider.classList.remove( "invisible" ); - state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.add( + state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.remove( "invisible" ); } else { state.ctxmenu.keepUnmaskedBlurSlider.classList.add("invisible"); - state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.remove( + state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.add( "invisible" ); } @@ -2184,6 +2184,21 @@ const dreamTool = () => menu.appendChild(state.ctxmenu.outpaintTypeSelect); menu.appendChild(state.ctxmenu.overMaskPxLabel); menu.appendChild(state.ctxmenu.eagerGenerateCountLabel); + + if (localStorage.getItem("openoutpaint/dream-keepunmasked") == "true") { + state.ctxmenu.keepUnmaskedBlurSlider.classList.remove("invisible"); + } else { + state.ctxmenu.keepUnmaskedBlurSlider.classList.add("invisible"); + } + + if (localStorage.getItem("openoutpaint/dream-removebg") == "true") { + state.ctxmenu.carveBlurSlider.classList.remove("invisible"); + state.ctxmenu.carveThresholdSlider.classList.remove("invisible"); + } else { + state.ctxmenu.carveBlurSlider.classList.add("invisible"); + state.ctxmenu.carveThresholdSlider.classList.add("invisible"); + } + }, shortcut: "D", } @@ -2848,6 +2863,21 @@ const img2imgTool = () => menu.appendChild(btnArray2); menu.appendChild(state.ctxmenu.borderMaskSlider); menu.appendChild(state.ctxmenu.eagerGenerateCountLabel); + + if (localStorage.getItem("openoutpaint/img2img-keepunmasked") == "true") { + state.ctxmenu.keepUnmaskedBlurSlider.classList.remove("invisible"); + } else { + state.ctxmenu.keepUnmaskedBlurSlider.classList.add("invisible"); + } + + if (localStorage.getItem("openoutpaint/img2img-removebg") == "true") { + state.ctxmenu.carveBlurSlider.classList.remove("invisible"); + state.ctxmenu.carveThresholdSlider.classList.remove("invisible"); + } else { + state.ctxmenu.carveBlurSlider.classList.add("invisible"); + state.ctxmenu.carveThresholdSlider.classList.add("invisible"); + } + }, shortcut: "I", }