blob: 5c73b95be2653170d088da1baad157263cd43973 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
export default class Overlay {
zIndex = 900;
zIndexHidden = -100;
constructor() {
const overlay = document.createElement('div');
overlay.id = 'libo-overlay';
overlay.classList.add('libo-overlay');
// initialized state
overlay.style.zIndex = this.zIndexHidden;
overlay.style.opacity = '0';
this.element = overlay;
document.body.appendChild(overlay);
return this;
}
show() {
this.element.style.opacity = '1';
this.element.style.zIndex = this.zIndex;
}
hide() {
this.element.style.opacity = '0';
this.element.style.zIndex = '-100';
}
}
|