diff options
| author | Andy Rickert <andrew_rickert@brown.edu> | 2020-08-10 21:04:34 -0400 |
|---|---|---|
| committer | Andy Rickert <andrew_rickert@brown.edu> | 2020-08-10 21:04:34 -0400 |
| commit | a1147c3c3e6ef3d16f850ef61f1c88099e3ab686 (patch) | |
| tree | fa86e54f4673bb1fbe5de55b6b29c8a5a6dd30be /src/client/views/MainViewNotifs.tsx | |
| parent | cf45a2398dce7af290bed364fa1bb8681134ce15 (diff) | |
| parent | 8001f8aa447729d667f8e903f9d3dc7766ef3320 (diff) | |
reverting back to earlier algorithm
Diffstat (limited to 'src/client/views/MainViewNotifs.tsx')
| -rw-r--r-- | src/client/views/MainViewNotifs.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/MainViewNotifs.tsx b/src/client/views/MainViewNotifs.tsx index ce47e1cf1..89006ebc8 100644 --- a/src/client/views/MainViewNotifs.tsx +++ b/src/client/views/MainViewNotifs.tsx @@ -1,12 +1,13 @@ -import { action, computed, observable } from 'mobx'; +import { observable } from 'mobx'; import { observer } from 'mobx-react'; import "normalize.css"; import * as React from 'react'; import { Doc, DocListCast, Opt } from '../../fields/Doc'; -import { emptyFunction, returnFalse, setupMoveUpEvents } from '../../Utils'; -import { SetupDrag, DragManager } from '../util/DragManager'; +import { returnFalse, setupMoveUpEvents } from '../../Utils'; +import { DragManager } from '../util/DragManager'; import "./MainViewNotifs.scss"; import { MainView } from './MainView'; +import { NumCast } from '../../fields/Types'; @observer @@ -27,7 +28,7 @@ export class MainViewNotifs extends React.Component { render() { const length = MainViewNotifs.NotifsCol ? DocListCast(MainViewNotifs.NotifsCol.data).length : 0; - return <div className="mainNotifs-container" style={{ width: 15, height: 15 }} ref={this._notifsRef}> + return <div className="mainNotifs-container" style={{ width: 15, height: 15, top: 12 + NumCast(MainViewNotifs.NotifsCol?.position) * 60 }} ref={this._notifsRef}> <button className="mainNotifs-badge" style={length > 0 ? { "display": "initial" } : { "display": "none" }} onPointerDown={this.onPointerDown} > {length} |
