Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updateTooltip ({ msg, d3TargetElement, targetRect, outerRect = document.body.getBoundingClientRect(), offset, pointerCoords, verticalAlign = 'bottom' }) {
// returns if the tooltip is hidden
if (this.isHidden) return
const msgHtmlNode = toHtml(msg, 'tooltip-default-message')
this.d3TooltipInner.classed('top bottom', false)
this.d3TooltipInner.classed(verticalAlign, true)
let {
x,
y,
width,
height
} = targetRect || d3TargetElement.node().getBoundingClientRect()
if (offset) {
x += offset.x || 0
y += offset.y || 0
width += offset.width || 0
height += offset.height || 0