From 73dc79ddc41b56e2f36a5b2e442fe9c71648b118 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 17 Mar 2021 15:08:47 -0400 Subject: rearranged top bar buttons - moved some into PropertiesButtons. Cleaned up 'editing' field for key frames to not write to the document. --- src/client/views/collections/CollectionMenu.tsx | 104 +++++++++++------------- 1 file changed, 46 insertions(+), 58 deletions(-) (limited to 'src/client/views/collections/CollectionMenu.tsx') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index dd0cb86c2..6a9ad27c0 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -223,7 +223,6 @@ export class CollectionViewBaseChrome extends React.Component(); private _viewRef = React.createRef(); @observable private _currentKey: string = ""; @@ -430,14 +429,13 @@ export class CollectionViewBaseChrome extends React.Component; - const targetDoc = this.selectedDoc; - {/* return (!targetDoc || (targetDoc._viewType !== CollectionViewType.Freeform && targetDoc.type !== DocumentType.IMG)) ? (null) :
{"Pin to presentation trail with current view"}
} placement="top"> */ } - return (targetDoc && targetDoc.type !== DocumentType.PRES && (targetDoc._viewType === CollectionViewType.Freeform || targetDoc._viewType === CollectionViewType.Stacking || targetDoc.type === DocumentType.VID || targetDoc.type === DocumentType.IMG || targetDoc.type === DocumentType.PDF || targetDoc.type === DocumentType.WEB || targetDoc.type === DocumentType.VID || targetDoc.type === DocumentType.RTF || targetDoc.type === DocumentType.COMPARISON)) ?
{"Pin with current view"}
} placement="top"> - -
: (null); + return !this.selectedDoc ? (null) : + {"Pin with current view"}} placement="top"> + + ; } @@ -488,48 +486,40 @@ export class CollectionViewBaseChrome extends React.Component{"Show Lightbox of Documents"}} placement="top"> -
; } - @computed get gridbackgroundButton() { - const targetDoc = this.selectedDoc; - return !targetDoc ? (null) : {"Toggle background grid"}} placement="top"> - - ; - } render() { return (
- {this.notACollection || this.props.type === CollectionViewType.Invalid ? (null) : this.viewModes} - {!this._buttonizableCommands ? (null) : this.templateChrome} - {this.props.docView.props.ContainingCollectionDoc?._viewType !== CollectionViewType.Freeform ? (null) : - Toggle Overlay Layer
} placement="bottom"> - - } - {this.notACollection ? (null) : this.lightboxButton} - {this.notACollection ? (null) : this.gridbackgroundButton} {this.aliasButton} {/* {this.pinButton} */} {this.pinWithViewButton} + {this.lightboxButton} + Toggle Overlay Layer
} placement="bottom"> + + + {this.subChrome} + {/* {this.notACollection || this.props.type === CollectionViewType.Invalid ? (null) : this.viewModes} */} + {!this._buttonizableCommands ? (null) : this.templateChrome}
- {this.subChrome} ); @@ -737,38 +727,36 @@ export class CollectionFreeFormViewChrome extends React.Component - {!Doc.UserDoc().noviceMode && !this.isText && !this.props.isDoc ? - <> - Back Frame} placement="bottom"> -
- -
-
- Toggle View All} placement="bottom"> -
this.document.editing = !this.document.editing)} > - {NumCast(this.document._currentFrame)} -
-
- Forward Frame} placement="bottom"> -
- -
-
- - : null} - {!this.selectedDocumentView?.ComponentView?.menuControls ? (null) : this.selectedDocumentView?.ComponentView?.menuControls?.()} {!this.isText ? <> {this.drawButtons} {this.widthPicker} {this.colorPicker} {this.fillPicker} + {Doc.UserDoc().noviceMode || this.props.isDoc ? (null) : + <> + Back Frame} placement="bottom"> +
+ +
+
+ Toggle View All} placement="bottom"> +
this.props.docView.ComponentView?.setKeyFrameEditing?.(!this.props.docView.ComponentView?.getKeyFrameEditing?.()))} > + {NumCast(this.document._currentFrame)} +
+
+ Forward Frame} placement="bottom"> +
+ +
+
+ } : - (null) + } - {
} + {!this.selectedDocumentView?.ComponentView?.menuControls ? (null) : this.selectedDocumentView?.ComponentView?.menuControls?.()} ; } } -- cgit v1.2.3-70-g09d2