From ac54c0c466c796c462af399016389a79bc6a4e92 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 3 Sep 2020 00:29:45 -0400 Subject: doc decorations removes menu and iconify icon when too small now. --- src/client/views/DocumentDecorations.tsx | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 7781d6069..81c1676b0 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -598,16 +598,11 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> return collectionAcl === AclAdmin || collectionAcl === AclEdit; }); const minimal = bounds.r - bounds.x < 100 ? true : false; - const maximizeIcon = minimal ? ( - Show context menu} placement="top"> -
- -
) : canDelete ? ( - Close} placement="top"> -
- {/* Currently, this is set to be enabled if there is no ink selected. It might be interesting to think about minimizing ink if it's useful? -syip2*/} - -
) : (null); + const closeIcon = canDelete ? ( + Close} placement="top"> +
+ +
) : (null); const titleArea = this._edtingTitle ? {minimal ? (null) : Show context menu} placement="top">
} -
+
{`${this.selectionTitle}`}
; @@ -651,9 +646,9 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> left: bounds.x - this._resizeBorderWidth / 2, top: bounds.y - this._resizeBorderWidth / 2 - this._titleHeight, }}> - {maximizeIcon} + {closeIcon} {titleArea} - {SelectionManager.SelectedDocuments().length !== 1 || seldoc.Document.type === DocumentType.INK ? (null) : + {SelectionManager.SelectedDocuments().length !== 1 || seldoc.Document.type === DocumentType.INK || minimal ? (null) : {`${seldoc.finalLayoutKey.includes("icon") ? "De" : ""}Iconify Document`}
} placement="top">
-- cgit v1.2.3-70-g09d2