fix(ui): toggle control adapter layer vis

This commit is contained in:
psychedelicious 2024-04-30 09:50:59 +10:00 committed by Kent Keirsey
parent 5bf4d37949
commit 9d67ec9efe

View File

@ -473,7 +473,11 @@ const updateControlNetLayerImageAttrs = (
let needsCache = false; let needsCache = false;
const newWidth = stage.width() / stage.scaleX(); const newWidth = stage.width() / stage.scaleX();
const newHeight = stage.height() / stage.scaleY(); const newHeight = stage.height() / stage.scaleY();
if (konvaImage.width() !== newWidth || konvaImage.height() !== newHeight) { if (
konvaImage.width() !== newWidth ||
konvaImage.height() !== newHeight ||
konvaImage.visible() !== reduxLayer.isEnabled
) {
konvaImage.setAttrs({ konvaImage.setAttrs({
opacity: reduxLayer.opacity, opacity: reduxLayer.opacity,
scaleX: 1, scaleX: 1,