From 41ccf50f2b551edd6827c9fd6296b9ff87a65915 Mon Sep 17 00:00:00 2001 From: geireann Date: Sat, 31 Jul 2021 15:32:37 -0400 Subject: linking updates and tab updates --- src/client/views/nodes/DocumentLinksButton.scss | 15 ++++- src/client/views/nodes/DocumentLinksButton.tsx | 83 +++++++++++++------------ src/client/views/nodes/DocumentView.scss | 2 +- 3 files changed, 55 insertions(+), 45 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/DocumentLinksButton.scss b/src/client/views/nodes/DocumentLinksButton.scss index 3809319d7..9bab72d55 100644 --- a/src/client/views/nodes/DocumentLinksButton.scss +++ b/src/client/views/nodes/DocumentLinksButton.scss @@ -1,6 +1,16 @@ @import "../global/globalCssVariables.scss"; +.documentLinksButton-menu { + width: 100%; + height: 100%; + position: relative; + display: flex; + align-content: center; + justify-content: center; + align-items: center; +} + .documentLinksButton-cont { min-width: 20; min-height: 20; @@ -10,8 +20,8 @@ .documentLinksButton, .documentLinksButton-endLink, .documentLinksButton-startLink { - height: 20px; - width: 20px; + height: 25px; + width: 25px; position: absolute; border-radius: 50%; opacity: 0.9; @@ -38,7 +48,6 @@ font-weight: bold; &:hover { - background: $medium-gray; transform: scale(1.05); cursor: pointer; } diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx index ed0e2d1ad..cec06d2d4 100644 --- a/src/client/views/nodes/DocumentLinksButton.tsx +++ b/src/client/views/nodes/DocumentLinksButton.tsx @@ -252,49 +252,50 @@ export class DocumentLinksButton extends React.Component; - return
-
- {this.props.InMenu ? - this.props.StartLink ? - - : link - : Array.from(this.filteredLinks).length} -
- {this.props.InMenu && !this.props.StartLink && DocumentLinksButton.StartLink !== this.props.View.props.Document ? //if the origin node is not this node -
+
DocumentLinksButton.StartLink && DocumentLinksButton.finishLinkClick(e.clientX, e.clientY, DocumentLinksButton.StartLink, this.props.View.props.Document, true, this.props.View)}> - {this.props.StartLink ? - - : link} -
- : (null) - } - {DocumentLinksButton.StartLink === this.props.View.props.Document && this.props.InMenu && this.props.StartLink ? //if link has been started from current node, then set behavior of link button to deactivate linking when clicked again -
- {this.props.StartLink ? - - : link} + backgroundColor: Colors.LIGHT_BLUE, + color: Colors.BLACK, + width: btnDim, + height: btnDim, + }}> + {Array.from(this.filteredLinks).length}
- : (null) - } -
; +
+ : +
+ {this.props.InMenu && !this.props.StartLink && DocumentLinksButton.StartLink !== this.props.View.props.Document ? //if the origin node is not this node +
DocumentLinksButton.StartLink && DocumentLinksButton.finishLinkClick(e.clientX, e.clientY, DocumentLinksButton.StartLink, this.props.View.props.Document, true, this.props.View)}> + {this.props.StartLink ? + + : link} +
+ : (null) + } + { + this.props.InMenu ? //if link has been started from current node, then set behavior of link button to deactivate linking when clicked again +
+ {this.props.StartLink ? + + : link} +
+ : (null)} +
+ ) } render() { diff --git a/src/client/views/nodes/DocumentView.scss b/src/client/views/nodes/DocumentView.scss index 281f25fb3..7f164ca48 100644 --- a/src/client/views/nodes/DocumentView.scss +++ b/src/client/views/nodes/DocumentView.scss @@ -147,7 +147,7 @@ .documentView-titleWrapper, .documentView-titleWrapper-hover { overflow: hidden; - color: gray; + color: $black; transform-origin: top left; top: 0; width: 100%; -- cgit v1.2.3-70-g09d2