Merge pull request #276 from Hangover3832/mask_blur_fix
Slider visibility & variable typo corrected
This commit is contained in:
commit
5ab59ca7fa
2 changed files with 34 additions and 4 deletions
|
@ -2015,12 +2015,12 @@ const dreamTool = () =>
|
||||||
state.ctxmenu.keepUnmaskedBlurSlider.classList.remove(
|
state.ctxmenu.keepUnmaskedBlurSlider.classList.remove(
|
||||||
"invisible"
|
"invisible"
|
||||||
);
|
);
|
||||||
state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.add(
|
state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.remove(
|
||||||
"invisible"
|
"invisible"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
state.ctxmenu.keepUnmaskedBlurSlider.classList.add("invisible");
|
state.ctxmenu.keepUnmaskedBlurSlider.classList.add("invisible");
|
||||||
state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.remove(
|
state.ctxmenu.keepUnmaskedBlurSliderLinebreak.classList.add(
|
||||||
"invisible"
|
"invisible"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -2184,6 +2184,21 @@ const dreamTool = () =>
|
||||||
menu.appendChild(state.ctxmenu.outpaintTypeSelect);
|
menu.appendChild(state.ctxmenu.outpaintTypeSelect);
|
||||||
menu.appendChild(state.ctxmenu.overMaskPxLabel);
|
menu.appendChild(state.ctxmenu.overMaskPxLabel);
|
||||||
menu.appendChild(state.ctxmenu.eagerGenerateCountLabel);
|
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",
|
shortcut: "D",
|
||||||
}
|
}
|
||||||
|
@ -2848,6 +2863,21 @@ const img2imgTool = () =>
|
||||||
menu.appendChild(btnArray2);
|
menu.appendChild(btnArray2);
|
||||||
menu.appendChild(state.ctxmenu.borderMaskSlider);
|
menu.appendChild(state.ctxmenu.borderMaskSlider);
|
||||||
menu.appendChild(state.ctxmenu.eagerGenerateCountLabel);
|
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",
|
shortcut: "I",
|
||||||
}
|
}
|
||||||
|
|
|
@ -420,7 +420,7 @@ const selectTransformTool = () =>
|
||||||
const lscursor = m.transformPoint({x: sx, y: sy});
|
const lscursor = m.transformPoint({x: sx, y: sy});
|
||||||
|
|
||||||
const xs = lscursor.x / scaling.handle.x;
|
const xs = lscursor.x / scaling.handle.x;
|
||||||
const xy = lscursor.y / scaling.handle.y;
|
const ys = lscursor.y / scaling.handle.y;
|
||||||
|
|
||||||
let xscale = 1;
|
let xscale = 1;
|
||||||
let yscale = 1;
|
let yscale = 1;
|
||||||
|
@ -429,7 +429,7 @@ const selectTransformTool = () =>
|
||||||
xscale = xs;
|
xscale = xs;
|
||||||
yscale = ys;
|
yscale = ys;
|
||||||
} else {
|
} else {
|
||||||
xscale = yscale = Math.max(xs, xy);
|
xscale = yscale = Math.max(xs, ys);
|
||||||
}
|
}
|
||||||
|
|
||||||
state.selected.scale = {x: xscale, y: yscale};
|
state.selected.scale = {x: xscale, y: yscale};
|
||||||
|
|
Loading…
Reference in a new issue