diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-18 15:05:53 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-18 15:05:53 -0500 |
| commit | 5b5730a7df073659cbb6c326f748f7fcbe6625e8 (patch) | |
| tree | 4eed039040d17c87f5b5ef8562b33389e1cca165 /src/client/views/DocumentDecorations.tsx | |
| parent | 73e13094c0a1b1fb391f2e44abeaffd01ff59c74 (diff) | |
lots of changes to try to simplify API for viewPaths and related
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 788e78ed2..c96253405 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -303,7 +303,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora SelectionManager.DeselectAll(); }; - onSelectContainerDocClick = () => SelectionManager.Views?.[0]?._props.docViewPath?.().lastElement()?.select(false); + onSelectContainerDocClick = () => SelectionManager.Views?.[0]?.containerViewPath?.().lastElement()?.select(false); /** * sets up events when user clicks on the border radius editor */ @@ -677,7 +677,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora seldocview._props.hideDeleteButton || seldocview.Document.hideDeleteButton || SelectionManager.Views.some(docView => { - const collectionAcl = docView._props.docViewPath()?.lastElement() ? GetEffectiveAcl(docView._props.docViewPath().lastElement().dataDoc) : AclEdit; + const collectionAcl = docView.containerViewPath?.()?.lastElement() ? GetEffectiveAcl(docView.containerViewPath?.().lastElement().dataDoc) : AclEdit; return collectionAcl !== AclAdmin && collectionAcl !== AclEdit && GetEffectiveAcl(docView.Document) !== AclAdmin; }); const topBtn = (key: string, icon: string, pointerDown: undefined | ((e: React.PointerEvent) => void), click: undefined | ((e: any) => void), title: string) => ( @@ -805,7 +805,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora <div key="br" className="documentDecorations-bottomRightResizer" onPointerDown={this.onPointerDown} /> </> )} - {seldocview._props.renderDepth <= 1 || !seldocview._props.docViewPath().lastElement() ? null : topBtn('selector', 'arrow-alt-circle-up', undefined, this.onSelectContainerDocClick, 'tap to select containing document')} + {seldocview._props.renderDepth <= 1 || !seldocview.containerViewPath?.().lastElement() ? null : topBtn('selector', 'arrow-alt-circle-up', undefined, this.onSelectContainerDocClick, 'tap to select containing document')} {useRounding && ( <div className="documentDecorations-borderRadius" |
