fix sizeLimit reset after inpainting
This commit is contained in:
parent
e4a6c91f4a
commit
544da231f6
@ -248,9 +248,6 @@ export default function Editor(props: EditorProps) {
|
||||
setMinScale(s)
|
||||
setScale(s)
|
||||
|
||||
const imageSizeLimit = Math.max(original.width, original.height)
|
||||
setSizeLimit(imageSizeLimit)
|
||||
|
||||
if (context?.canvas) {
|
||||
context.canvas.width = original.naturalWidth
|
||||
context.canvas.height = original.naturalHeight
|
||||
@ -260,6 +257,8 @@ export default function Editor(props: EditorProps) {
|
||||
if (!initialCentered) {
|
||||
viewportRef.current?.centerView(s, 1)
|
||||
setInitialCentered(true)
|
||||
const imageSizeLimit = Math.max(original.width, original.height)
|
||||
setSizeLimit(imageSizeLimit)
|
||||
}
|
||||
}, [
|
||||
context?.canvas,
|
||||
|
Loading…
Reference in New Issue
Block a user