Facyla commented on code in PR #37105:
URL: https://github.com/apache/superset/pull/37105#discussion_r2736964825
##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/CountryMap.js:
##########
@@ -134,6 +134,16 @@ function CountryMap(element, props) {
return '';
};
+ const svgHeight = svg.node().getBoundingClientRect().height;
+ const updatePopupPosition = () => {
+ const [x, y] = d3.mouse(svg.node());
+ hoverPopup
+ .style('display', 'block')
+ .style('top', `${y + 30}px`)
+ .style('left', `${x}px`)
+ .classed('popup-at-bottom', y > (svgHeight * 2) / 3);
+ };
Review Comment:
Adding a test for the feature that was introduced formerly was not planned
in this PR.
--
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]