|
|
|
@ -58,8 +58,8 @@ export class PopoverController extends Controller {
|
|
|
|
|
const popover = this.get(name); |
|
|
|
|
popover.show && popover.show(); |
|
|
|
|
const render = this.getRender(); |
|
|
|
|
const elRect = Widget._renderEngine.createElement(render)[0].getBoundingClientRect(); |
|
|
|
|
const W = elRect.width, H = elRect.height; |
|
|
|
|
const el = Widget._renderEngine.createElement(render)[0]; |
|
|
|
|
const W = el.clientWidth, H = el.clientHeight; |
|
|
|
|
const w = popover.element.width(), h = popover.element.height(); |
|
|
|
|
let left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
|
if (left < 0) { |
|
|
|
|