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