viking7982 commented on code in PR #18436:
URL: https://github.com/apache/echarts/pull/18436#discussion_r1155539540
##########
src/component/tooltip/TooltipHTMLContent.ts:
##########
@@ -212,14 +212,14 @@ function assembleCssText(tooltipModel:
Model<TooltipOption>, enableTransition?:
}
// If not able to make, do not modify the input `out`.
-function makeStyleCoord(out: number[], zr: ZRenderType, appendToBody: boolean,
zrX: number, zrY: number) {
+function makeStyleCoord(out: number[], zr: ZRenderType, container: HTMLElement
| null, zrX: number, zrY: number) {
const zrPainter = zr && zr.painter;
- if (appendToBody) {
+ if (container) {
const zrViewportRoot = zrPainter && zrPainter.getViewportRoot();
if (zrViewportRoot) {
// Some APPs might use scale on body, so we support CSS transform
here.
- transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY);
+ transformLocalCoord(out, zrViewportRoot, container, zrX, zrY);
Review Comment:
the custom contain can also be css transformed. So I think we might need the
same logic if the user choose a custom element. That the reason I want to keep
container empty so I can know which position logic need to be applied.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]