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