Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tooltips stay visible when Shiny redraws the heatmap #60

Open
mkuhn opened this issue Apr 27, 2016 · 2 comments
Open

tooltips stay visible when Shiny redraws the heatmap #60

mkuhn opened this issue Apr 27, 2016 · 2 comments

Comments

@mkuhn
Copy link

mkuhn commented Apr 27, 2016

When a tooltip is shown while Shiny changes the heatmap, the old tooltip stays visible and cannot be removed by the user. In general, it seems that d3heatmap creates new tooltip divs every time it is redrawn. As a workaround, I have added this code to my Shiny app:

tags$script('
  $(document).ready(function() {
    $("#heatmap").on("shiny:recalculating", function(event) {
      $(".d3heatmap-tip").remove();
    });
  });
')

However, it would be nice if d3heatmap would remove or recycle the tooltips.

@Tixierae
Copy link

Tixierae commented Nov 6, 2020

@mkuhn thank you very much for sharing your code! I had the exact same problem, and it fixed it.

@Tixierae
Copy link

Tixierae commented Jan 8, 2021

The same issue also happens when resizing the window. Adding a snippet with shiny:visualchange instead of shiny:recalculating does the trick though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants