diff options
| author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-03 12:28:25 -0500 |
|---|---|---|
| committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-03 12:28:25 -0500 |
| commit | a63200e21d6304ef347a5a123839cd06ac04ec72 (patch) | |
| tree | 956fd10a778a23b26188c8c1a10e35c5e6d9f13c /src/client/views/MainView.tsx | |
| parent | 89f19acdbf4a4aa81537b56665353b7c0d4c8e30 (diff) | |
menu button fix and link greyed out
Diffstat (limited to 'src/client/views/MainView.tsx')
| -rw-r--r-- | src/client/views/MainView.tsx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 09980ce97..8ee34a4b0 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -384,12 +384,26 @@ export class MainView extends React.Component { @action onFlyoutPointerDown = (e: React.PointerEvent) => { - this.panelContent = "none"; if (this._flyoutTranslate) { setupMoveUpEvents(this, e, action((e: PointerEvent) => { this.flyoutWidth = Math.max(e.clientX, 0); + if (this.flyoutWidth < 5) { + this.panelContent = "none"; + this._lastButton && (this._lastButton.color = "white"); + this._lastButton && (this._lastButton._backgroundColor = ""); + } return false; - }), emptyFunction, action(() => this.flyoutWidth = this.flyoutWidth < 15 ? 250 : 0)); + }), emptyFunction, this.openCloseFlyout); + } + } + + @action + openCloseFlyout = () => { + this.flyoutWidth = this.flyoutWidth < 15 ? 250 : 0; + if (this.flyoutWidth < 15) { + this.panelContent = "none"; + this._lastButton && (this._lastButton.color = "white"); + this._lastButton && (this._lastButton._backgroundColor = ""); } } @@ -480,8 +494,8 @@ export class MainView extends React.Component { @action @undoBatch closeFlyout = () => { - // this._lastButton && (this._lastButton.color = "white"); - // this._lastButton && (this._lastButton._backgroundColor = ""); + this._lastButton && (this._lastButton.color = "white"); + this._lastButton && (this._lastButton._backgroundColor = ""); this.panelContent = "none"; this.flyoutWidth = 0; } |
