aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-06-11 12:43:16 -0400
committerbobzel <zzzman@gmail.com>2025-06-11 12:43:16 -0400
commitb4db1e2467337468139d0e92ef94799c4143a0fc (patch)
tree1393a3529483b789656a867bcbaf54fd24d2e13a /src/client/views/nodes
parent3df4e67c42e431603d60f00d0a91867df7d0e2a6 (diff)
added outpaintable method to streamline determining which docs can be outpainted.
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/ImageBox.tsx10
-rw-r--r--src/client/views/nodes/scrapbook/ScrapbookBox.tsx2
2 files changed, 6 insertions, 6 deletions
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<FieldViewProps>() {
}
};
- 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<FieldViewProps>() {
};
@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<FieldViewProps>() {
return this._props.PanelWidth() / this._props.PanelHeight() < this.nativeSize.nativeWidth / this.nativeSize.nativeHeight;
}
+ isOutpaintable = () => true;
+
componentUI = (/* boundsLeft: number, boundsTop: number*/) =>
!this._showOutpaintPrompt ? null : (
<div
diff --git a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
index 94522c979..2db76c76f 100644
--- a/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
+++ b/src/client/views/nodes/scrapbook/ScrapbookBox.tsx
@@ -174,6 +174,8 @@ export class ScrapbookBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
);
}
+ isOutpaintable = () => true;
+
@action
generateAiImage = (prompt: string) => {
this._loading = true;