isVisible => isVisibleSync

This commit is contained in:
toasted-nutbread 2019-12-15 21:48:29 -05:00
parent 72ab6f1f45
commit 29734ea6e9
3 changed files with 7 additions and 7 deletions

View File

@ -166,7 +166,7 @@ class SettingsPopupPreview {
this.textSource = source;
await this.frontend.showContentCompleted();
if (this.frontend.popup.isVisible()) {
if (this.frontend.popup.isVisibleSync()) {
this.popupShown = true;
}

View File

@ -140,7 +140,7 @@ class PopupProxyHost {
}
static _popupCanShow(popup) {
return popup.parent === null || popup.parent.isVisible();
return popup.parent === null || popup.parent.isVisibleSync();
}
}

View File

@ -70,7 +70,7 @@ class Popup {
}
hide(changeFocus) {
if (!this.isVisible()) {
if (!this.isVisibleSync()) {
return;
}
@ -84,7 +84,7 @@ class Popup {
}
async isVisibleAsync() {
return this.isVisible();
return this.isVisibleSync();
}
setVisibleOverride(visible) {
@ -93,7 +93,7 @@ class Popup {
}
async containsPoint(x, y) {
for (let popup = this; popup !== null && popup.isVisible(); popup = popup._child) {
for (let popup = this; popup !== null && popup.isVisibleSync(); popup = popup._child) {
const rect = popup._container.getBoundingClientRect();
if (x >= rect.left && y >= rect.top && x < rect.right && y < rect.bottom) {
return true;
@ -135,7 +135,7 @@ class Popup {
parent._child = this;
}
isVisible() {
isVisibleSync() {
return this._isInjected && (this._visibleOverride !== null ? this._visibleOverride : this._visible);
}
@ -279,7 +279,7 @@ class Popup {
}
_updateVisibility() {
this._container.style.setProperty('visibility', this.isVisible() ? 'visible' : 'hidden', 'important');
this._container.style.setProperty('visibility', this.isVisibleSync() ? 'visible' : 'hidden', 'important');
}
_focusParent() {