From b4db1e2467337468139d0e92ef94799c4143a0fc Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 11 Jun 2025 12:43:16 -0400 Subject: added outpaintable method to streamline determining which docs can be outpainted. --- src/client/views/nodes/ImageBox.tsx | 10 ++++------ src/client/views/nodes/scrapbook/ScrapbookBox.tsx | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index d7e21b0a6..a99421f6d 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -262,9 +262,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent() { } }; - handleSelection = async (selection: string) => { - this._searchInput = selection; - }; + handleSelection = async (selection: string) => (this._searchInput = selection); drop = undoable( action((e: Event, de: DragManager.DropEvent) => { @@ -429,9 +427,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent() { }; @action - handlePromptChange = (val: string | number) => { - this._outpaintPromptInput = '' + val; - }; + handlePromptChange = (val: string | number) => (this._outpaintPromptInput = '' + val); @action submitOutpaintPrompt = () => { @@ -532,6 +528,8 @@ export class ImageBox extends ViewBoxAnnotatableComponent() { return this._props.PanelWidth() / this._props.PanelHeight() < this.nativeSize.nativeWidth / this.nativeSize.nativeHeight; } + isOutpaintable = () => true; + componentUI = (/* boundsLeft: number, boundsTop: number*/) => !this._showOutpaintPrompt ? null : (
() ); } + isOutpaintable = () => true; + @action generateAiImage = (prompt: string) => { this._loading = true; -- cgit v1.2.3-70-g09d2