mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-18 07:40:31 +02:00
Only 'resizeInpaintingEditor' if 'aspectRatio' has changed.
This commit is contained in:
@@ -279,6 +279,11 @@ function resizeInpaintingEditor() {
|
||||
widthValue = (widthValue / heightValue) * INPAINTING_EDITOR_SIZE
|
||||
heightValue = INPAINTING_EDITOR_SIZE
|
||||
}
|
||||
if (inpaintingEditor.opts.aspectRatio === (widthValue / heightValue).toFixed(3)) {
|
||||
// Same ratio, don't reset the canvas.
|
||||
return
|
||||
}
|
||||
inpaintingEditor.opts.aspectRatio = (widthValue / heightValue).toFixed(3)
|
||||
|
||||
inpaintingEditorContainer.style.width = widthValue + 'px'
|
||||
inpaintingEditorContainer.style.height = heightValue + 'px'
|
||||
|
Reference in New Issue
Block a user