Bloquage du clavier quand le panel est activé
This commit is contained in:
parent
7db79125f0
commit
e274e46ebb
|
@ -71,6 +71,7 @@ export default class Gestionnaire {
|
|||
.then((mot) => {
|
||||
this._motATrouver = mot;
|
||||
this._input = new Input(this, this._config, this._motATrouver.length, this._motATrouver[0]);
|
||||
this._panelManager.setInput(this._input);
|
||||
this._grille = new Grille(this._motATrouver.length, this._maxNbPropositions, this._motATrouver[0], this._audioPanel);
|
||||
this._configurationPanel.setInput(this._input);
|
||||
this._compositionMotATrouver = this.decompose(this._motATrouver);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import Input from "./input";
|
||||
|
||||
export default class PanelManager {
|
||||
private readonly _panelArea: HTMLElement;
|
||||
private readonly _panelFenetre: HTMLElement;
|
||||
|
@ -5,6 +7,8 @@ export default class PanelManager {
|
|||
private readonly _panelContenu: HTMLElement;
|
||||
private readonly _panelFermetureBouton: HTMLElement;
|
||||
|
||||
private _input?: Input;
|
||||
|
||||
public constructor() {
|
||||
this._panelArea = document.getElementById("panel-area") as HTMLElement;
|
||||
this._panelFenetre = document.getElementById("panel-fenetre") as HTMLElement;
|
||||
|
@ -36,12 +40,18 @@ export default class PanelManager {
|
|||
);
|
||||
}
|
||||
|
||||
public setInput(input: Input): void {
|
||||
this._input = input;
|
||||
}
|
||||
|
||||
public afficherPanel(): void {
|
||||
this._panelArea.style.display = "block";
|
||||
if (this._input) this._input.bloquer();
|
||||
}
|
||||
|
||||
public cacherPanel(): void {
|
||||
this._panelArea.style.display = "none";
|
||||
if (this._input) this._input.debloquer();
|
||||
}
|
||||
|
||||
public setContenu(titre: string, contenu: string): void {
|
||||
|
|
Loading…
Reference in New Issue