Add getContainerRect to popup
This commit is contained in:
parent
37da5fef59
commit
4ba93b0770
@ -129,7 +129,7 @@ class PopupProxyHost {
|
|||||||
let x = jsonRect.x;
|
let x = jsonRect.x;
|
||||||
let y = jsonRect.y;
|
let y = jsonRect.y;
|
||||||
if (popup.parent !== null) {
|
if (popup.parent !== null) {
|
||||||
const popupRect = popup.parent.container.getBoundingClientRect();
|
const popupRect = popup.parent.getContainerRect();
|
||||||
x += popupRect.x;
|
x += popupRect.x;
|
||||||
y += popupRect.y;
|
y += popupRect.y;
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,10 @@ class Popup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getContainerRect() {
|
||||||
|
return this.container.getBoundingClientRect();
|
||||||
|
}
|
||||||
|
|
||||||
static injectOuterStylesheet(css) {
|
static injectOuterStylesheet(css) {
|
||||||
if (Popup.outerStylesheet === null) {
|
if (Popup.outerStylesheet === null) {
|
||||||
if (!css) { return; }
|
if (!css) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user