aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentButtonBar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r--src/client/views/DocumentButtonBar.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx
index bd82f7782..59d7e75da 100644
--- a/src/client/views/DocumentButtonBar.tsx
+++ b/src/client/views/DocumentButtonBar.tsx
@@ -229,7 +229,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
onPointerEnter={action(e => (this.subPin = allDocs ? 'All ' : ''))}
onPointerLeave={action(e => (this.subPin = ''))}
onClick={e => {
- this.props.views().forEach(dv => click(dv!.rootDoc));
+ this.props.views().forEach(dv => click(dv!.Document));
e.stopPropagation();
}}
/>
@@ -356,7 +356,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
const docs = this.props
.views()
.filter(v => v)
- .map(dv => dv!.rootDoc);
+ .map(dv => dv!.Document);
TabDocView.PinDoc(docs, {
pinAudioPlay: true,
pinDocLayout: pinLayoutView,
@@ -379,7 +379,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
const docs = this.props
.views()
.filter(v => v)
- .map(dv => dv!.rootDoc);
+ .map(dv => dv!.Document);
TabDocView.PinDoc(docs, { pinAudioPlay: true, pinDocLayout: e.shiftKey, pinData: { dataview: e.altKey }, activeFrame: Cast(docs.lastElement()?.activeFrame, 'number', null) });
e.stopPropagation();
}}>
@@ -560,9 +560,9 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
@action
toggleTrail = (e: React.PointerEvent) => {
const rootView = this.props.views()[0];
- const rootDoc = rootView?.rootDoc;
- if (rootDoc) {
- const anchor = rootView.ComponentView?.getAnchor?.(true) ?? rootDoc;
+ const doc = rootView?.Document;
+ if (doc) {
+ const anchor = rootView.ComponentView?.getAnchor?.(true) ?? doc;
const trail = DocCast(anchor.presentationTrail) ?? Doc.MakeCopy(DocCast(Doc.UserDoc().emptyTrail), true);
if (trail !== anchor.presentationTrail) {
DocUtils.MakeLink(anchor, trail, { link_relationship: 'link trail' });
@@ -589,9 +589,9 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
<div style={{ position: 'absolute', zIndex: 1000 }}>
<LinkPopup
key="popup"
- linkCreated={link => (link.link_displayLine = !IsFollowLinkScript(this.props.views().lastElement()?.rootDoc.onClick))}
+ linkCreated={link => (link.link_displayLine = !IsFollowLinkScript(this.props.views().lastElement()?.Document.onClick))}
linkCreateAnchor={() => this.props.views().lastElement()?.ComponentView?.getAnchor?.(true)}
- linkFrom={() => this.props.views().lastElement()?.rootDoc}
+ linkFrom={() => this.props.views().lastElement()?.Document}
/>
</div>
) : (