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

HoverText functionality not working #1630

Open
snamburi3 opened this issue Apr 18, 2023 · 3 comments
Open

HoverText functionality not working #1630

snamburi3 opened this issue Apr 18, 2023 · 3 comments

Comments

@snamburi3
Copy link

snamburi3 commented Apr 18, 2023

Hello IgvTeam,

I see some functionality for hover text (tooltip) on MouseOver(or MouseEvent) event in IGV. I am unable to get it working though. My react app does not show any tooltip.

The bigbed example just gives me a "undefined" for tooltip. I do see MouseOver event when enable "hoverText: (feature) => {console.log(feature);}" in the load tracks. It does not have any popover information.

I am looking for functionality to get a simple tooltip with read name.

Here is what I am doing:

  {
      name: "GenCC",
      description: "Annotations from the <a href='https://thegencc.org/' target='_blank'>The Gene Curation Coalition</a> courtesy of the UCSC Genome Browser team.  See the <a href='https://genome.ucsc.edu/cgi-bin/hgTrackUi?db=hg38&g=genCC' target='_blank'>UCSC track settings page</a> for more details.",
      url: "https://hgdownload.soe.ucsc.edu/gbdb/hg38/bbi/genCC.bb",
      type: "annotation",
      format: "bigbed",
      height: 300,
      displayMode: "EXPANDED",
      **hoverText: (feature) => `Disease : ${feature["disease_title"]}`**
  }

image

@jrobinso
Copy link
Contributor

There is currently no support for customizing hover text. Most elements do not have hover text, the track label being the exception. Even there the hover text is not customizable. Popup text for features is supported by clicking on them, but that is not of course hover text.

It's unclear to me how this is supposed to work. Are you getting this from one of our examples? You can customize the popup text if you click on a feature, we have examples for that, but there is no callback for hovering over a feature. Features are not even DOM elements, the entire track viewport is a single DOM element (a canvas).

      **hoverText: (feature) => `Disease : ${feature["disease_title"]}`**

@snamburi3
Copy link
Author

snamburi3 commented Apr 21, 2023

@jrobinso,I think some functionality to hover has been implemented. Here is the commit mentioned in the #1486.

The hoverText and HoverTextFields fields are mentioned in the bigbed example

Sorry if I misread the functionality. I am looking for the same tooltip functionality on hover with the read name.

@jrobinso
Copy link
Contributor

OK thanks for the clarification. There is a lot of experimental functionality in the source code and "dev" folders, the officially released API is documented in the wiki. This looks like a feature that was not completed and released, I can't find it in the release notes or wiki. I will leave this issue open and interpret it as a request, it should not be too difficult to fix but I can't give you a time estimate.

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