aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-01-13 22:26:35 -0500
committerbobzel <zzzman@gmail.com>2025-01-13 22:26:35 -0500
commit12f5a435ee6476e2e07ded0c9cdd597c70ca8af0 (patch)
tree258d3f999329bf94b5725fb5a04392aa007d6150 /src/client/views/PropertiesView.tsx
parentc2312afe4ee969043ba3ce4cb9c275a48b0f1ee0 (diff)
changing ai for images and collections to work mostly the same way. fixes for document view/collection/images to keep things working when the ai editor view reduces the rendered document size. fixed so that freeform views overlaid on images/vieos/etc have the ui menu items of collections.
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx48
1 files changed, 28 insertions, 20 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index e52189f56..42aa6782f 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -111,6 +111,7 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
@observable openContexts: boolean = true;
@observable openLinks: boolean = true;
@observable openAppearance: boolean = true;
+ @observable openFirefly: boolean = true;
@observable openTransform: boolean = true;
@observable openFilters: boolean = false;
@observable openStyling: boolean = true;
@@ -982,26 +983,10 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
10,
1
);
- const strength = this.getNumber('Reference Strength', '', 1, 100, this.refStrength, (val: number) => {
- !isNaN(val) && (this.refStrength = val);
- });
return (
<div>
- {!targetDoc.layout_isSvg && this.containsInkDoc && (
- <div>
- <div className="drawing-to-image">
- <Toggle
- text={'Create Image'}
- color={SettingsManager.userColor}
- icon={<FontAwesomeIcon icon="fill-drip" />}
- iconPlacement="left"
- align="flex-start"
- fillWidth
- toggleType={ToggleType.BUTTON}
- onClick={undoable(() => DrawingFillHandler.drawingToImage(targetDoc, this.refStrength, StrCast(targetDoc.title) !== 'grouping' ? StrCast(targetDoc.title) : ''), 'createImage')}
- />
- </div>
- <div className="strength-slider">{strength}</div>
+ <div>
+ {!targetDoc.layout_isSvg && this.containsInkDoc && (
<div className="color">
<Toggle
text={'Color with GPT'}
@@ -1016,8 +1001,8 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
}, 'colorWithGPT')}
/>
</div>
- </div>
- )}
+ )}
+ </div>
<div className="smooth">
<Toggle
text={'Smooth Ink Strokes'}
@@ -1113,6 +1098,8 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
this.openTransform = false;
this.openFields = false;
this.openSharing = false;
+ this.openAppearance = false;
+ this.openFirefly = false;
this.openLayout = false;
this.openFilters = false;
};
@@ -1323,11 +1310,32 @@ export class PropertiesView extends ObservableReactComponent<PropertiesViewProps
}
@computed get inkSubMenu() {
+ const strength = this.getNumber('Reference Strength', '', 1, 100, this.refStrength, (val: number) => {
+ !isNaN(val) && (this.refStrength = val);
+ });
+ const targetDoc = this.selectedLayoutDoc;
return (
<>
<PropertiesSection title="Appearance" isOpen={this.openAppearance} setIsOpen={bool => { this.openAppearance = bool; }} onDoubleClick={this.CloseAll}>
{this.selectedStrokes.length ? this.inkEditor : null}
</PropertiesSection>
+ <PropertiesSection title="Firefly" isOpen={this.openFirefly} setIsOpen={bool => { this.openFirefly = bool; }} onDoubleClick={this.CloseAll}>
+ <>
+ <div className="drawing-to-image">
+ <Toggle
+ text="Create Image"
+ color={SettingsManager.userColor}
+ icon={<FontAwesomeIcon icon="fill-drip" />}
+ iconPlacement="left"
+ align="flex-start"
+ fillWidth
+ toggleType={ToggleType.BUTTON}
+ onClick={undoable(() => DrawingFillHandler.drawingToImage(targetDoc, this.refStrength, StrCast(targetDoc.title) !== 'grouping' ? StrCast(targetDoc.title) : ''), 'createImage')}
+ />
+ </div>
+ <div className="strength-slider">{strength}</div>
+ </>
+ </PropertiesSection>
<PropertiesSection title="Transform" isOpen={this.openTransform} setIsOpen={bool => { this.openTransform = bool; }} onDoubleClick={this.CloseAll}>
{this.transformEditor}
</PropertiesSection>