fix /analysis#menu shortcut
This commit is contained in:
parent
8fe9fda682
commit
3e23c56396
|
@ -123,15 +123,8 @@ function studyButton(ctrl: AnalyseCtrl) {
|
|||
}
|
||||
|
||||
export class Ctrl {
|
||||
open: boolean;
|
||||
|
||||
constructor() {
|
||||
this.open = location.hash === '#menu';
|
||||
}
|
||||
|
||||
toggle(): void {
|
||||
this.open = !this.open;
|
||||
}
|
||||
open: boolean = false;
|
||||
toggle = () => this.open = !this.open;
|
||||
}
|
||||
|
||||
export function view(ctrl: AnalyseCtrl): VNode {
|
||||
|
|
|
@ -143,6 +143,7 @@ export default class AnalyseCtrl {
|
|||
this.studyPractice = this.study ? this.study.practice : undefined;
|
||||
|
||||
if (location.hash === '#practice' || (this.study && this.study.data.chapter.practice)) this.togglePractice();
|
||||
else if (location.hash === '#menu') li.requestIdleCallback(this.actionMenu.toggle);
|
||||
|
||||
keyboard.bind(this);
|
||||
|
||||
|
|
Loading…
Reference in a new issue