WIP
This commit is contained in:
parent
77e404bbda
commit
85594f4def
@ -28,6 +28,7 @@ class Popup {
|
||||
|
||||
this.popup.style.left = pos.x + 'px';
|
||||
this.popup.style.top = pos.y + 'px';
|
||||
this.popup.style.visibility = 'visible';
|
||||
|
||||
this.setContent(content);
|
||||
}
|
||||
@ -50,12 +51,15 @@ class Popup {
|
||||
|
||||
this.popup.style.left = pos.x + 'px';
|
||||
this.popup.style.top = pos.y + 'px';
|
||||
this.popup.style.visibility = 'visible';
|
||||
|
||||
this.setContent(content);
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.remove();
|
||||
if (this.popup !== null) {
|
||||
this.popup.style.visibility = 'hidden';
|
||||
}
|
||||
}
|
||||
|
||||
setContent(content) {
|
||||
@ -76,11 +80,4 @@ class Popup {
|
||||
|
||||
document.body.appendChild(this.popup);
|
||||
}
|
||||
|
||||
remove() {
|
||||
if (this.popup !== null) {
|
||||
this.popup.parentNode.removeChild(this.popup);
|
||||
this.popup = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user