Don't use setAttribute to overwrite the style

This commit is contained in:
cmdr2 2022-10-08 16:47:15 +05:30
parent 1ffe29c657
commit 66c7b3fcb2

View File

@ -276,15 +276,15 @@ function resizeInpaintingEditor() {
widthValue = (widthValue / heightValue) * INPAINTING_EDITOR_SIZE
heightValue = INPAINTING_EDITOR_SIZE
}
inpaintingEditorContainer.setAttribute("style", `width:${widthValue}px;height:${heightValue}px`)
inpaintingEditorContainer.style.width = widthValue + 'px'
inpaintingEditorContainer.style.height = heightValue + 'px'
inpaintingEditor.opts.enlargeYourContainer = true
inpaintingEditor.resize()
inpaintingEditor.ctx.lineCap = "round";
inpaintingEditor.ctx.lineJoin = "round";
inpaintingEditor.ctx.lineCap = "round"
inpaintingEditor.ctx.lineJoin = "round"
inpaintingEditor.ctx.lineWidth = inpaintingEditor.opts.size
inpaintingEditor.setColor(inpaintingEditor.opts.color)
}