aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-04-28 12:52:29 -0400
committerbobzel <zzzman@gmail.com>2025-04-28 12:52:29 -0400
commita25dc02334de3f5b58aff1911bdae30d49a1d26b (patch)
tree6fdc319fa86edb5aa1b20f98a5351648646d239b /src/client/views/nodes/ImageBox.tsx
parentb60b1863be5ecf987f3d3f2483e28e74f634853f (diff)
cleaned up outpainting and Doc resize code. fixes problems with doc resizing of text boxes with ctrl-key.
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 999d7089b..197ef0998 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -170,14 +170,6 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
},
{ fireImmediately: true }
);
- this._disposers.outpainting = reaction(
- () => this.Document?._needsOutpainting,
- needsOutpainting => {
- if (needsOutpainting && this.Document?._outpaintingResize) {
- this.processOutpainting();
- }
- }
- );
}
componentWillUnmount() {
@@ -421,7 +413,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
const response = await Networking.PostToServer('/outpaintImage', {
imageUrl: currentPath,
prompt: customPrompt,
- originalDimensions: { width: origWidth, height: origHeight },
+ originalDimensions: { width: Math.min(newWidth, origWidth), height: Math.min(newHeight, origHeight) },
newDimensions: { width: newWidth, height: newHeight },
});