mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-05-30 06:40:09 +02:00
Only 'resizeInpaintingEditor' if 'aspectRatio' has changed.
This commit is contained in:
parent
68dd9a29e8
commit
2c4a8619a8
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user