diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-25 12:23:42 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-25 12:23:42 -0400 |
commit | d0e20b86d1236f99f58b0241b61af15e39561c66 (patch) | |
tree | 6bbf22f1c4e8efae829b1e740467ff0e9ddd819f /src | |
parent | c692276b6c6909d6cf32b620eb69b114057662ca (diff) |
fixed blue button visibility for document decoration button bar
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentButtonBar.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/DocumentLinksButton.tsx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index 49c15f764..fcaea0f0b 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -271,7 +271,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV const considerPush = isText && this.considerGoogleDocsPush; return <div className="documentButtonBar"> <div className="documentButtonBar-button"> - <DocumentLinksButton View={this.view0!} /> + <DocumentLinksButton View={this.view0!} AlwaysOn={true} /> </div> <div className="documentButtonBar-button"> {this.templateButton} diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx index ef900fff6..f35b48ce4 100644 --- a/src/client/views/nodes/DocumentLinksButton.tsx +++ b/src/client/views/nodes/DocumentLinksButton.tsx @@ -17,6 +17,7 @@ export const Flyout = higflyout.default; interface DocumentLinksButtonProps { View: DocumentView; Offset?: number[]; + AlwaysOn?: boolean; } @observer export class DocumentLinksButton extends React.Component<DocumentLinksButtonProps, {}> { @@ -80,7 +81,7 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp @computed get linkButton() { const links = DocListCast(this.props.View.props.Document.links); - return !links.length || links[0].hidden ? (null) : + return (!links.length || links[0].hidden) && !this.props.AlwaysOn ? (null) : <div title="Drag(create link) Tap(view links)" ref={this._linkButton} style={{ position: "absolute", left: this.props.Offset?.[0] }}> <div className={"documentLinksButton"} style={{ backgroundColor: DocumentLinksButton.StartLink ? "transparent" : "" }} onPointerDown={this.onLinkButtonDown} |