diff options
| author | Stanley <syip0810@gmail.com> | 2019-05-19 14:10:53 -0700 |
|---|---|---|
| committer | Stanley <syip0810@gmail.com> | 2019-05-19 14:10:53 -0700 |
| commit | eec769b586d4a1c6e73c4ce4ae78b4b8f2d4762b (patch) | |
| tree | 7218f2df63e028391e40a084d41bce72fd43e00c /src/client/views/SearchItem.tsx | |
| parent | 2cc62cd88688ccdec8275fcaaba939d448f9baf5 (diff) | |
| parent | 01a223f2e6685506cc1e5db69e9062d5ff0d3246 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into pdf_impl
Diffstat (limited to 'src/client/views/SearchItem.tsx')
| -rw-r--r-- | src/client/views/SearchItem.tsx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/views/SearchItem.tsx b/src/client/views/SearchItem.tsx index 0da0bdae8..01c7316d6 100644 --- a/src/client/views/SearchItem.tsx +++ b/src/client/views/SearchItem.tsx @@ -40,6 +40,14 @@ export class SearchItem extends React.Component<SearchProps> { faCaretUp; return <FontAwesomeIcon icon={button} className="documentView-minimizedIcon" />; } + onPointerEnter = (e: React.PointerEvent) => { + this.props.doc.libraryBrush = true; + Doc.SetOnPrototype(this.props.doc, "protoBrush", true); + } + onPointerLeave = (e: React.PointerEvent) => { + this.props.doc.libraryBrush = false; + Doc.SetOnPrototype(this.props.doc, "protoBrush", false); + } collectionRef = React.createRef<HTMLDivElement>(); startDocDrag = () => { @@ -53,7 +61,9 @@ export class SearchItem extends React.Component<SearchProps> { } render() { return ( - <div className="search-item" ref={this.collectionRef} id="result" onClick={this.onClick} onPointerDown={SetupDrag(this.collectionRef, this.startDocDrag)} > + <div className="search-item" ref={this.collectionRef} id="result" + onPointerEnter={this.onPointerEnter} onPointerLeave={this.onPointerLeave} + onClick={this.onClick} onPointerDown={SetupDrag(this.collectionRef, this.startDocDrag)} > <div className="search-title" id="result" >title: {this.props.doc.title}</div> {/* <div className="search-type" id="result" >Type: {this.props.doc.layout}</div> */} {/* <div className="search-type" >{SearchItem.DocumentIcon(this.layout)}</div> */} |
