Add visibility query

This commit is contained in:
Alex Yatskov 2016-09-29 21:04:03 -07:00
parent e433207968
commit 1d573f4179

View File

@ -51,6 +51,10 @@ class Popup {
this.showAt({x: posX, y: posY}, content); this.showAt({x: posX, y: posY}, content);
} }
visible() {
return this.popup !== null && this.popup.style.visibility !== 'hidden';
}
hide() { hide() {
if (this.popup !== null) { if (this.popup !== null) {
this.popup.style.visibility = 'hidden'; this.popup.style.visibility = 'hidden';