make containsPoint async everywhere
This commit is contained in:
parent
71471d08e5
commit
87ff5cb19b
@ -294,7 +294,7 @@ class Frontend {
|
||||
async searchAt(point, type) {
|
||||
if (
|
||||
this.pendingLookup ||
|
||||
(this.popup.containsPointIsAsync() ? await this.popup.containsPointAsync(point) : this.popup.containsPoint(point))
|
||||
await this.popup.containsPoint(point)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ class PopupProxyHost {
|
||||
|
||||
async containsPoint(id, point) {
|
||||
const popup = this.getPopup(id);
|
||||
return popup.containsPointIsAsync() ? await popup.containsPointAsync(point) : popup.containsPoint(point);
|
||||
return await popup.containsPoint(point);
|
||||
}
|
||||
|
||||
async termsShow(id, elementRect, definitions, options, context) {
|
||||
|
@ -69,21 +69,13 @@ class PopupProxy {
|
||||
return await this.invokeHostApi('setVisible', {id, visible});
|
||||
}
|
||||
|
||||
containsPoint() {
|
||||
throw 'Non-async function not supported';
|
||||
}
|
||||
|
||||
async containsPointAsync(point) {
|
||||
async containsPoint(point) {
|
||||
if (this.id === null) {
|
||||
return false;
|
||||
}
|
||||
return await this.invokeHostApi('containsPoint', {id: this.id, point});
|
||||
}
|
||||
|
||||
containsPointIsAsync() {
|
||||
return true;
|
||||
}
|
||||
|
||||
async termsShow(elementRect, definitions, options, context) {
|
||||
const id = await this.getPopupId();
|
||||
elementRect = PopupProxy.DOMRectToJson(elementRect);
|
||||
|
@ -248,7 +248,7 @@ class Popup {
|
||||
}
|
||||
}
|
||||
|
||||
containsPoint(point) {
|
||||
async containsPoint(point) {
|
||||
if (!this.isVisible()) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user