From 9688e3bb1e67336fe57e11b186936830d5483b06 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 4 Mar 2025 20:57:27 -0500 Subject: fixed frame animtation to not write 0's by default. fixed lightbox stepinto to restore collection pan/zoom correctly. removed firefly unused ai buttons from imagebox. --- src/client/views/LightboxView.tsx | 6 +- .../views/nodes/CollectionFreeFormDocumentView.tsx | 2 +- src/client/views/nodes/ImageBox.scss | 7 +- src/client/views/nodes/ImageBox.tsx | 89 ++++------------------ 4 files changed, 23 insertions(+), 81 deletions(-) (limited to 'src') diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 0be847281..5698da785 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -93,7 +93,7 @@ export class LightboxView extends ObservableReactComponent { savedKeys.forEach(key => { lightDoc[key] = this._savedState[key]; }); - this._savedState = {}; + lightDoc !== doc && (this._savedState = {}); if (doc) { lightDoc !== doc && @@ -136,9 +136,7 @@ export class LightboxView extends ObservableReactComponent { return this.SetLightboxDoc( doc, undefined, - [...DocListCast(doc[Doc.LayoutFieldKey(doc)]), ...DocListCast(doc[Doc.LayoutFieldKey(doc) + '_annotations']).filter(anno => anno.annotationOn !== doc), ...this._future].sort( - (a, b) => NumCast(b._timecodeToShow) - NumCast(a._timecodeToShow) - ), + [...DocListCast(doc[Doc.LayoutFieldKey(doc) + '_annotations']).filter(anno => anno.annotationOn !== doc), ...this._future].sort((a, b) => NumCast(b._timecodeToShow) - NumCast(a._timecodeToShow)), layoutTemplate ); }; diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index 76d6ed80b..ce1e9280a 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -180,7 +180,7 @@ export class CollectionFreeFormDocumentView extends DocComponent { const findexed = Cast(d[`${val}_indexed`], listSpec('number'), []).slice(); - findexed[timecode] = vals[val] || 0; + findexed[timecode] = vals[val] as unknown as number; d[`${val}_indexed`] = new List(findexed); }); } diff --git a/src/client/views/nodes/ImageBox.scss b/src/client/views/nodes/ImageBox.scss index 671621bbe..15581a9e8 100644 --- a/src/client/views/nodes/ImageBox.scss +++ b/src/client/views/nodes/ImageBox.scss @@ -195,8 +195,9 @@ flex-direction: row; gap: 5px; width: 100%; + padding: 0 10; .imageBox-aiView-regenerate-createBtn { - max-width: 10%; + max-width: 20%; .button-container { width: 100% !important; justify-content: left !important; @@ -207,7 +208,7 @@ .imageBox-aiView-firefly { overflow: hidden; text-overflow: ellipsis; - max-width: 10%; + max-width: 15%; width: 100%; } .imageBox-aiView-regenerate-send { @@ -218,7 +219,7 @@ text-align: center; align-items: center; display: flex; - max-width: 25%; + max-width: 90%; width: 100%; .imageBox-aiView-similarity { max-width: 65; diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 279317f49..4979a4d4d 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -624,28 +624,10 @@ export class ImageBox extends ViewBoxAnnotatableComponent() { className="imageBox-aiView-input" aria-label="Edit instructions input" type="text" - value={this._regenInput} + value={this._regenInput || StrCast(this.Document.title)} onChange={action(e => this._canInteract && (this._regenInput = e.target.value))} placeholder={this._regenInput || StrCast(this.Document.title)} /> -
- Similarity - this._canInteract && (this._fireflyRefStrength = val as number))} - valueLabelDisplay="auto" - /> -
-
- More: -
-- cgit v1.2.3-70-g09d2