diff options
author | bobzel <zzzman@gmail.com> | 2025-02-24 10:59:15 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-02-24 10:59:15 -0500 |
commit | c1159c2587d69e42496c493b508ecb3e8ba0f65c (patch) | |
tree | 63410b955c08d55cbd4bad5b2bda281cfab6d153 | |
parent | 30ec70722678eba318fb7521a8b2bd642328bf54 (diff) |
made images able to non-unifrom resize. changed popup to generate descriptions only after it's opened.
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 2 | ||||
-rw-r--r-- | src/client/views/pdf/GPTPopup/GPTPopup.tsx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index dd28832f9..1cc298b11 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -855,5 +855,5 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { Docs.Prototypes.TemplateMap.set(DocumentType.IMG, { layout: { view: ImageBox, dataField: 'data' }, - options: { acl: '', freeform: '', systemIcon: 'BsFileEarmarkImageFill' }, + options: { acl: '', freeform: '', _layout_nativeDimEditable: true, systemIcon: 'BsFileEarmarkImageFill' }, }); diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx index b7eaf2674..2cf39bec4 100644 --- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx +++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx @@ -75,9 +75,9 @@ export class GPTPopup extends ObservableReactComponent<object> { } componentDidMount(): void { reaction( - () => DocumentView.Selected().lastElement(), - selDoc => { - const hasChildDocs = selDoc?.ComponentView?.hasChildDocs; + () => ({ selDoc: DocumentView.Selected().lastElement(), visible: SnappingManager.ChatVisible }), + ({ selDoc, visible }) => { + const hasChildDocs = visible && selDoc?.ComponentView?.hasChildDocs; if (hasChildDocs) { this._textToDocMap.clear(); this.setCollectionContext(selDoc.Document); |