aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentButtonBar.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-01-18 14:33:26 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-01-18 14:33:26 -0500
commit286673d88a412432bc3555769c223f7c3db6ff5c (patch)
tree8938245fd370bd64debfbbaa5bdf9a3f02b2cba3 /src/client/views/DocumentButtonBar.tsx
parent39e8bd2671d70e1e8fd708c5210120a9d09b64fa (diff)
parentc94a8d93ea7373af54355b5c47bf14a021cf4563 (diff)
merged
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r--src/client/views/DocumentButtonBar.tsx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx
index 96f5d78fd..a2bd0aad9 100644
--- a/src/client/views/DocumentButtonBar.tsx
+++ b/src/client/views/DocumentButtonBar.tsx
@@ -186,20 +186,21 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
@computed
get pinButton() {
const targetDoc = this.view0?.props.Document;
- const isPinned = targetDoc && Doc.isDocPinned(targetDoc);
- return !targetDoc ? (null) : <Tooltip title={<><div className="dash-tooltip">{SelectionManager.Views().length > 1 ? "Pin multiple documents to presentation" : "Pin to presentation"}</div></>}>
+ return !targetDoc ? (null) : <Tooltip title={
+ <div className="dash-tooltip">{SelectionManager.Views().length > 1 ? "Pin multiple documents to presentation" : "Pin to presentation"}</div>}>
<div className="documentButtonBar-linker"
style={{ color: "white" }}
- onClick={undoBatch(e => this.props.views().map(view => view && TabDocView.PinDoc(view.props.Document, false)))}>
+ onClick={undoBatch(e => this.props.views().map(view => view && TabDocView.PinDoc(view.props.Document, { setPosition: e.shiftKey ? true : undefined })))}>
<FontAwesomeIcon className="documentdecorations-icon" size="sm" icon="map-pin" />
- </div></Tooltip>;
+ </div>
+ </Tooltip>;
}
@undoBatch
@action
pinWithView = (targetDoc: Doc) => {
if (targetDoc) {
- TabDocView.PinDoc(targetDoc, false);
+ TabDocView.PinDoc(targetDoc);
const activeDoc = PresBox.Instance.childDocs[PresBox.Instance.childDocs.length - 1];
const scrollable: boolean = (targetDoc.type === DocumentType.PDF || targetDoc.type === DocumentType.RTF || targetDoc.type === DocumentType.WEB || targetDoc._viewType === CollectionViewType.Stacking);
const pannable: boolean = ((targetDoc.type === DocumentType.COL && targetDoc._viewType === CollectionViewType.Freeform) || targetDoc.type === DocumentType.IMG);