|
|
|
@ -198,11 +198,11 @@ export class Popover extends Widget {
|
|
|
|
|
mounted() { |
|
|
|
|
this.startX = 0; |
|
|
|
|
this.startY = 0; |
|
|
|
|
const bodyDom = getOuterBody(); |
|
|
|
|
this.tracker = new MouseMoveTracker( |
|
|
|
|
(deltaX, deltaY) => { |
|
|
|
|
const W = Widget._renderEngine.createElement(bodyDom).width(); |
|
|
|
|
const H = Widget._renderEngine.createElement(bodyDom).height(); |
|
|
|
|
const el = Widget._renderEngine.createElement(getOuterBody())[0]; |
|
|
|
|
const W = el.clientWidth; |
|
|
|
|
const H = el.clientHeight; |
|
|
|
|
this.startX += deltaX; |
|
|
|
|
this.startY += deltaY; |
|
|
|
|
this.element.css({ |
|
|
|
@ -246,7 +246,7 @@ export class Popover extends Widget {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_getSuitableWidth(width) { |
|
|
|
|
return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody()).width()); |
|
|
|
|
return clamp(width, 0, Widget._renderEngine.createElement(getOuterBody())[0].clientWidth); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_calculateSize() { |
|
|
|
|