aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesDocBacklinksSelector.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-05-02 00:39:31 -0400
committerbobzel <zzzman@gmail.com>2024-05-02 00:39:31 -0400
commitdd08c20ec6df3fad6ecd6b16c787f10b0c23feb4 (patch)
tree11f2b1b741369997af567983df0316923e08d780 /src/client/views/PropertiesDocBacklinksSelector.tsx
parent76838b7b3842c9b184e6459e29796dd14de37e8d (diff)
lots more dependency cycle unwinding.
Diffstat (limited to 'src/client/views/PropertiesDocBacklinksSelector.tsx')
-rw-r--r--src/client/views/PropertiesDocBacklinksSelector.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/PropertiesDocBacklinksSelector.tsx b/src/client/views/PropertiesDocBacklinksSelector.tsx
index a806995f2..edb55f341 100644
--- a/src/client/views/PropertiesDocBacklinksSelector.tsx
+++ b/src/client/views/PropertiesDocBacklinksSelector.tsx
@@ -7,12 +7,12 @@ import { Doc } from '../../fields/Doc';
import { Cast } from '../../fields/Types';
import { DocumentType } from '../documents/DocumentTypes';
import { LinkManager } from '../util/LinkManager';
-import { SelectionManager } from '../util/SelectionManager';
import { SettingsManager } from '../util/SettingsManager';
import './PropertiesDocBacklinksSelector.scss';
import { CollectionDockingView } from './collections/CollectionDockingView';
import { LinkMenu } from './linking/LinkMenu';
import { OpenWhere } from './nodes/OpenWhere';
+import { DocumentView } from './nodes/DocumentView';
type PropertiesDocBacklinksSelectorProps = {
Document: Doc;
@@ -25,7 +25,7 @@ type PropertiesDocBacklinksSelectorProps = {
export class PropertiesDocBacklinksSelector extends React.Component<PropertiesDocBacklinksSelectorProps> {
getOnClick = action((link: Doc) => {
const linkAnchor = this.props.Document;
- const other = LinkManager.getOppositeAnchor(link, linkAnchor);
+ const other = Doc.getOppositeAnchor(link, linkAnchor);
const otherdoc = !other ? undefined : other.annotationOn && other.type !== DocumentType.RTF ? Cast(other.annotationOn, Doc, null) : other;
LinkManager.Instance.currentLink = link;
if (otherdoc) {
@@ -36,10 +36,10 @@ export class PropertiesDocBacklinksSelector extends React.Component<PropertiesDo
});
render() {
- return !SelectionManager.Views.length ? null : (
+ return !DocumentView.Selected().length ? null : (
<div className="propertiesDocBacklinksSelector" style={{ color: SettingsManager.userColor, backgroundColor: SettingsManager.userBackgroundColor }}>
{this.props.hideTitle ? null : <p key="contexts">Contexts:</p>}
- <LinkMenu docView={SelectionManager.Views.lastElement()} clearLinkEditor={undefined} itemHandler={this.getOnClick} style={{ left: 0, top: 0 }} />
+ <LinkMenu docView={DocumentView.Selected().lastElement()} clearLinkEditor={undefined} itemHandler={this.getOnClick} style={{ left: 0, top: 0 }} />
</div>
);
}