diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-22 21:45:28 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-22 21:45:28 -0500 |
| commit | 001127c07f95173d7036db19d07dcfb1135f3caa (patch) | |
| tree | 6489446110038835536f1916791cfe6faa793bc3 /src/client/views/nodes/formattedText | |
| parent | 953a298b49c2345741fd7989f9b62cadd76eea52 (diff) | |
fixed schema rows to render, fix for resizing docs from left side. all locking docs in non freeform view. fix for labelBox with multiple rows to keep top rows. cleaned up docViewPath/containerViewPath &
Diffstat (limited to 'src/client/views/nodes/formattedText')
| -rw-r--r-- | src/client/views/nodes/formattedText/DashDocView.tsx | 7 | ||||
| -rw-r--r-- | src/client/views/nodes/formattedText/DashFieldView.tsx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/DashDocView.tsx b/src/client/views/nodes/formattedText/DashDocView.tsx index 61576a498..4ae12505e 100644 --- a/src/client/views/nodes/formattedText/DashDocView.tsx +++ b/src/client/views/nodes/formattedText/DashDocView.tsx @@ -11,7 +11,7 @@ import { DocServer } from '../../../DocServer'; import { Docs, DocUtils } from '../../../documents/Documents'; import { Transform } from '../../../util/Transform'; import { ObservableReactComponent } from '../../ObservableReactComponent'; -import { DocFocusOptions, DocumentView } from '../DocumentView'; +import { DocFocusOptions, DocumentView, returnEmptyDocViewList } from '../DocumentView'; import { FormattedTextBox } from './FormattedTextBox'; var horizPadding = 3; // horizontal padding to container to allow cursor to show up on either side. @@ -178,6 +178,9 @@ export class DashDocViewInternal extends ObservableReactComponent<IDashDocViewIn ele && (ele.style.backgroundColor = 'orange'); }; + @computed get childContainerViewPath() { + return this._textBox.DocumentView?.().docViewPath ?? returnEmptyDocViewList; + } componentWillUnmount = () => Object.values(this._disposers).forEach(disposer => disposer?.()); isContentActive = () => this._props.tbox._props.isContentActive() || this._props.tbox.isAnyChildContentActive?.(); @@ -207,7 +210,7 @@ export class DashDocViewInternal extends ObservableReactComponent<IDashDocViewIn isDocumentActive={returnFalse} isContentActive={this.isContentActive} styleProvider={this._textBox._props.styleProvider} - containerViewPath={this._textBox.docViewPath ?? returnEmptyDoclist} + containerViewPath={this.childContainerViewPath} ScreenToLocalTransform={this.getDocTransform} addDocTab={this._textBox._props.addDocTab} pinToPres={returnFalse} diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index 3f2ab0ec5..dc9914637 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -148,7 +148,7 @@ export class DashFieldViewInternal extends ObservableReactComponent<IDashFieldVi } createPivotForField = (e: React.MouseEvent) => { - let container = this._props.tbox.containerViewPath?.().lastElement(); + let container = this._props.tbox.DocumentView?.().containerViewPath?.().lastElement(); if (container) { const embedding = Doc.MakeEmbedding(container.Document); embedding._type_collection = CollectionViewType.Time; |
