add a healthy dose of mobile copium

This commit is contained in:
LenAnderson
2023-11-23 20:34:20 +00:00
parent 81f135fa7c
commit cdbcd6cfb2
6 changed files with 104 additions and 24 deletions

View File

@ -47,9 +47,18 @@ export class SubMenu {
});
}
hide() {
this.root.remove();
this.root.style.top = '';
this.root.style.left = '';
if (this.root) {
this.root.remove();
this.root.style.top = '';
this.root.style.left = '';
}
this.isActive = false;
}
toggle(/**@type {HTMLElement}*/parent) {
if (this.isActive) {
this.hide();
} else {
this.show(parent);
}
}
}