diff options
author | bob <bcz@cs.brown.edu> | 2019-12-05 11:37:08 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-12-05 11:37:08 -0500 |
commit | f1d89e46aa4a2d10dcbe6d36ecf2aebdb348f887 (patch) | |
tree | cb32bbd2d7e642f3bb1f8cacbe147dc571fca26d | |
parent | fa89fbf06f3d27ff0ca3f62fa6e6ab4fe378edf1 (diff) |
better highlighting of path target
-rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 2 | ||||
-rw-r--r-- | src/new_fields/Doc.ts | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index 219d56607..bf612e4f1 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -400,7 +400,7 @@ class TreeView extends React.Component<TreeViewProps> { <div className="docContainer" title="click to edit title" id={`docContainer-${this.props.parentKey}`} ref={reference} onPointerDown={onItemDown} style={{ color: this.props.document.isMinimized ? "red" : "black", - background: Doc.IsBrushed(this.props.document) ? "#06121212" : "0", + background: Doc.IsHighlighted(this.props.document) ? "orange" : Doc.IsBrushed(this.props.document) ? "#06121212" : "0", fontWeight: this.props.document.search_string ? "bold" : undefined, outline: BoolCast(this.props.document.workspaceBrush) ? "dashed 1px #06123232" : undefined, pointerEvents: this.props.active() || SelectionManager.GetIsDragging() ? "all" : "none" diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 9f5b86e8d..c6b134d6c 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -532,7 +532,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu cm.addItem({ description: `path: ${path}`, event: () => { this.props.LibraryPath.map(lp => Doc.GetProto(lp).treeViewOpen = lp.treeViewOpen = true); - Doc.BrushDoc(this.props.Document); + Doc.linkFollowHighlight(this.props.Document); }, icon: "check" }); } diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index cf32fa74a..6f55775fe 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -700,8 +700,7 @@ export namespace Doc { } const highlightManager = new HighlightBrush(); export function IsHighlighted(doc: Doc) { - const IsHighlighted = highlightManager.HighlightedDoc.get(doc) || highlightManager.HighlightedDoc.get(Doc.GetDataDoc(doc)); - return IsHighlighted; + return highlightManager.HighlightedDoc.get(doc) || highlightManager.HighlightedDoc.get(Doc.GetDataDoc(doc)); } export function HighlightDoc(doc: Doc) { runInAction(() => { |