From a9bfba81c25df304d00111c0cd8dccf7571a8418 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Tue, 4 Aug 2020 15:00:45 -0500 Subject: adding inking commands for images, pdf, etc in top menu on select --- src/client/views/collections/CollectionMenu.tsx | 29 +++++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 53c2495d0..ce5283928 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -236,7 +236,7 @@ export class CollectionViewBaseChrome extends React.Component); case CollectionViewType.Stacking: return (); case CollectionViewType.Schema: return (); @@ -247,6 +247,21 @@ export class CollectionViewBaseChrome extends React.Component); } } + + @computed get otherSubChrome() { + const docType = this.props.docView.Document.type; + switch (docType) { + default: return (null); + case DocumentType.IMG: return (); + case DocumentType.PDF: return (); + case DocumentType.INK: return (); + case DocumentType.WEB: return (); + case DocumentType.VID: return (); + case DocumentType.RTF: return (); + } + } + + private dropDisposer?: DragManager.DragDropDisposer; protected createDropTarget = (ele: HTMLDivElement) => { this.dropDisposer?.(); @@ -392,7 +407,7 @@ export class CollectionDockingChrome extends React.Component { +export class CollectionFreeFormViewChrome extends React.Component { public static Instance: CollectionFreeFormViewChrome; constructor(props: any) { super(props); @@ -591,31 +606,31 @@ export class CollectionFreeFormViewChrome extends React.Component - {this.props.docView.props.renderDepth !== 0 || this.isText ? (null) : + {this.props.docView.props.renderDepth !== 0 || this.isText || this.props.isDoc ? (null) : Toggle Mini Map} placement="bottom">
} - {!this.isText ? Back Frame} placement="bottom"> + {!this.isText && !this.props.isDoc ? Back Frame} placement="bottom">
: null} - {!this.isText ? Toggle View All} placement="bottom"> + {!this.isText && !this.props.isDoc ? Toggle View All} placement="bottom">
this.document.editing = !this.document.editing)} > {NumCast(this.document.currentFrame)}
: null} - {!this.isText ? Forward Frame} placement="bottom"> + {!this.isText && !this.props.isDoc ? Forward Frame} placement="bottom">
: null} - {!this.props.isOverlay || this.document.type !== DocumentType.WEB || this.isText ? (null) : + {!this.props.isOverlay || this.document.type !== DocumentType.WEB || this.isText || this.props.isDoc ? (null) : Use Hypothesis} placement="bottom">