diff options
author | bob <bcz@cs.brown.edu> | 2019-10-05 13:56:31 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-10-05 13:56:31 -0400 |
commit | 961cb1566e16edb353975ec436a4445c1cf3db0f (patch) | |
tree | f333e7b52dbc999ca11ae63e32ade5f80b846a27 /src/client/views/pdf/PDFMenu.tsx | |
parent | 54f2067dbadb66e22249c1572bdc5d6d097f41d1 (diff) | |
parent | f9916faa215297d434aab2357b98d2c4b1fdcb92 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/pdf/PDFMenu.tsx')
-rw-r--r-- | src/client/views/pdf/PDFMenu.tsx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/client/views/pdf/PDFMenu.tsx b/src/client/views/pdf/PDFMenu.tsx index e62542014..1e3320069 100644 --- a/src/client/views/pdf/PDFMenu.tsx +++ b/src/client/views/pdf/PDFMenu.tsx @@ -4,7 +4,7 @@ import { observable, action, } from "mobx"; import { observer } from "mobx-react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { emptyFunction, returnFalse } from "../../../Utils"; -import { Doc } from "../../../new_fields/Doc"; +import { Doc, Opt } from "../../../new_fields/Doc"; @observer export default class PDFMenu extends React.Component { @@ -31,7 +31,7 @@ export default class PDFMenu extends React.Component { @observable public Pinned: boolean = false; public StartDrag: (e: PointerEvent, ele: HTMLElement) => void = emptyFunction; - public Highlight: (color: string) => void = emptyFunction; + public Highlight: (color: string) => Opt<Doc> = (color: string) => undefined; public Delete: () => void = emptyFunction; public Snippet: (marquee: { left: number, top: number, width: number, height: number }) => void = emptyFunction; public AddTag: (key: string, value: string) => boolean = returnFalse; @@ -155,12 +155,8 @@ export default class PDFMenu extends React.Component { @action highlightClicked = (e: React.MouseEvent) => { - if (!this.Pinned) { - this.Highlight("#f4f442"); - } - else { + if (!this.Highlight("rgba(245, 230, 95, 0.616)") && this.Pinned) { this.Highlighting = !this.Highlighting; - this.Highlight("#f4f442"); } } |