@@ -507,6 +507,7 @@ export const nodeLifecycleMethods = {
507507 this . tooltipTimer = null ;
508508 }
509509 this . hideVueCompatTooltip ( ) ;
510+ this . _vueCompatTooltipPointerPosition = null ;
510511 this . hoverElement = null ;
511512 this . tooltipElement = null ;
512513 this . showTooltip = false ;
@@ -557,6 +558,18 @@ export const nodeLifecycleMethods = {
557558 tooltip . style . left = "0px" ;
558559 tooltip . style . top = "0px" ;
559560
561+ this . positionVueCompatTooltip ( pointerPosition ) ;
562+ tooltip . style . visibility = "visible" ;
563+ } ,
564+
565+ positionVueCompatTooltip ( pointerPosition ) {
566+ const tooltip = this . _vueCompatTooltip ;
567+ const clientX = Number ( pointerPosition ?. clientX ) ;
568+ const clientY = Number ( pointerPosition ?. clientY ) ;
569+ if ( ! tooltip || ! Number . isFinite ( clientX ) || ! Number . isFinite ( clientY ) || typeof document === "undefined" ) {
570+ return ;
571+ }
572+
560573 const tooltipRect = tooltip . getBoundingClientRect ( ) ;
561574 const viewportWidth = document . documentElement ?. clientWidth || globalThis . innerWidth || 0 ;
562575 const viewportHeight = document . documentElement ?. clientHeight || globalThis . innerHeight || 0 ;
@@ -579,7 +592,6 @@ export const nodeLifecycleMethods = {
579592
580593 tooltip . style . left = `${ Math . round ( left ) } px` ;
581594 tooltip . style . top = `${ Math . round ( top ) } px` ;
582- tooltip . style . visibility = "visible" ;
583595 } ,
584596
585597 hideVueCompatTooltip ( ) {
@@ -591,6 +603,7 @@ export const nodeLifecycleMethods = {
591603 teardownVueCompatTooltip ( ) {
592604 this . _vueCompatTooltip ?. remove ?. ( ) ;
593605 this . _vueCompatTooltip = null ;
606+ this . _vueCompatTooltipPointerPosition = null ;
594607 } ,
595608
596609 teardownVueCompatCanvasEvents ( ) {
0 commit comments