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