diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-04-30 22:17:26 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-04-30 22:17:26 -0400 |
| commit | c92a8fbe94eb5e6167730ffa9a87e5e4e1d040e2 (patch) | |
| tree | 8daa21ff72fa094c65d26c2e7db1da6d99ce58ee /src/client/views/DocumentDecorations.tsx | |
| parent | d2fb3085fe17a9c66eab893b2a3d000a5bdec054 (diff) | |
| parent | 97ed2e452597d5f1f2e8d0abfc06e94b4aa5d448 (diff) | |
merged hannah's linking changes
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 8ee6a5b64..3ed8ba3b2 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -21,6 +21,11 @@ import { List } from "../../new_fields/List"; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; +import { faLink } from '@fortawesome/free-solid-svg-icons'; +import { library } from '@fortawesome/fontawesome-svg-core'; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + +library.add(faLink); @observer export class DocumentDecorations extends React.Component<{}, { value: string }> { @@ -29,7 +34,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> private _resizing = ""; private keyinput: React.RefObject<HTMLInputElement>; private _resizeBorderWidth = 16; - private _linkBoxHeight = 20; + private _linkBoxHeight = 20 + 3; // link button height + margin private _titleHeight = 20; private _linkButton = React.createRef<HTMLDivElement>(); private _linkerButton = React.createRef<HTMLDivElement>(); @@ -550,10 +555,17 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> <div id="documentDecorations-bottomLeftResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-bottomResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> <div id="documentDecorations-bottomRightResizer" className="documentDecorations-resizer" onPointerDown={this.onPointerDown} onContextMenu={(e) => e.preventDefault()}></div> - - <div title="View Links" className="linkFlyout" ref={this._linkButton}> {linkButton} </div> - <div className="linkButton-linker" ref={this._linkerButton} onPointerDown={this.onLinkerButtonDown}>∞</div> - <TemplateMenu doc={doc} templates={templates} /> + <div className="link-button-container"> + <div className="linkButtonWrapper"> + <div title="View Links" className="linkFlyout" ref={this._linkButton}> {linkButton} </div> + </div> + <div className="linkButtonWrapper"> + <div title="Drag Link" className="linkButton-linker" ref={this._linkerButton} onPointerDown={this.onLinkerButtonDown}> + <FontAwesomeIcon className="fa-icon-link" icon="link" size="sm" /> + </div> + </div> + <TemplateMenu doc={doc} templates={templates} /> + </div> </div > </div> ); |
