Facyla commented on code in PR #37105:
URL: https://github.com/apache/superset/pull/37105#discussion_r2737077534


##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/CountryMap.js:
##########
@@ -154,13 +164,15 @@ function CountryMap(element, props) {
       .html(
         `<div><strong>${getNameOfRegion(d)}</strong><br>${result.length > 0 ? 
format(result[0].metric) : ''}</div>`,
       );
+    updatePopupPosition();
   };
 
   const mousemove = function mousemove() {
     const position = d3.mouse(svg.node());
     hoverPopup
       .style('top', `${position[1] + 30}px`)
       .style('left', `${position[0]}px`);
+    updatePopupPosition();

Review Comment:
   Indeed. 
   My point of view is that positioning values (style rules) should be removed 
from there, and be applied only using CSS for a more consistent design. 
   However this PR was made with a minimal amount of changes in mind which is 
why it ends up being a little redundant here. 
   I'd suggest this PR as a quick fix, and rewriting the positioning logic 
afterwards (ie. moving from hardcoded inlined CSS rules in JS to regular CSS 
rules).



-- 
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]

Reply via email to