diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-11-17 19:28:30 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-11-17 19:28:30 +0530 |
| commit | 86408e6d93fbe6501694371736fe74b81ed39cf3 (patch) | |
| tree | 17b89a6209c66284f89e2636a8157435ce1045c0 /src/client/views/search | |
| parent | a002e0e5c5910f78c8f3910ad4101386d30ebf70 (diff) | |
| parent | 28dccafaa4aa446dd88c1b6f4218a0d7f79fa1bb (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/search')
| -rw-r--r-- | src/client/views/search/SearchBox.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index bc00e93a5..3adeb6133 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -25,6 +25,7 @@ import { FieldView, FieldViewProps } from '../nodes/FieldView'; import "./SearchBox.scss"; import { undoBatch } from "../../util/UndoManager"; import { DocServer } from "../../DocServer"; +import { MainView } from "../MainView"; export const searchSchema = createSchema({ Document: Doc }); @@ -53,6 +54,8 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc private newsearchstring = ""; private collectionRef = React.createRef<HTMLDivElement>(); + + @observable _undoBackground: string | undefined = ""; @observable _icons: string[] = this._allIcons; @observable _results: [Doc, string[], string[]][] = []; @observable _visibleElements: JSX.Element[] = []; @@ -354,7 +357,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc doc.x = x; doc.y = y; const size = 200; - const aspect = NumCast(doc._nativeHeight) / NumCast(doc._nativeWidth, 1); + const aspect = Doc.NativeHeight(doc) / (Doc.NativeWidth(doc) || 1); if (aspect > 1) { doc._height = size; doc._width = size / aspect; @@ -498,7 +501,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc const myDashboards = DocListCast(CurrentUserUtils.MyDashboards.data); return ( <div style={{ pointerEvents: "all" }} className="searchBox-container"> - <div className="searchBox-bar"> + <div className="searchBox-bar" style={{ background: SearchBox.Instance._undoBackground }}> <div className="searchBox-lozenges" > <div className="searchBox-lozenge-user"> {`${Doc.CurrentUserEmail}`} @@ -506,7 +509,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc Logoff </div> </div> - <div className="searchBox-lozenge" onClick={() => DocServer.PRINT_CACHE()}> + <div className="searchBox-lozenge" onClick={() => DocServer.UPDATE_SERVER_CACHE()}> {`UI project`} </div> <div className="searchBox-lozenge-dashboard" > |
