051f9d387aa2531eaae06445f1d4df13fed9f390 chmalee Mon Feb 9 15:43:06 2026 -0800 Oops, when I switched most area elements created by hgTracks to stick the tooltips into the data-tooltip attribute, I forgot to update the javascript mapItem code to use that as the title instead of what I set as the default, refs #37081 diff --git src/hg/js/utils.js src/hg/js/utils.js index 68081cabcb6..8f8bf66567b 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -3977,32 +3977,36 @@ if ( $(tr).length === 1 ) { var a = /tr_(.*)/.exec($(tr).attr('id')); // voodoo if (a && a[1]) { id = a[1]; } } } if (id.length > 0) { rightClick.currentMapItem = rightClick.makeMapItem(id); if (rightClick.currentMapItem) { rightClick.currentMapItem.href = this.href; rightClick.currentMapItem.title = this.title; // if the custom mouseover code has removed this title, check the attr // for the original title if (this.title.length === 0) { + if (this.getAttribute('data-tooltip') !== null) { + rightClick.currentMapItem.title = this.getAttribute("data-tooltip"); + } else { rightClick.currentMapItem.title = this.getAttribute("originalTitle"); } + } // Handle linked features with separate clickmaps for each exon/intron if ((this.title.indexOf('Exon ') === 0) || (this.title.indexOf('Intron ') === 0)) { // if the title is Exon ... or Intron ... // then search for the sibling with the same href // that has the real title item label var elem = this.parentNode.firstChild; while (elem) { if ((elem.href === this.href) && !((elem.title.indexOf('Exon ') === 0) || (elem.title.indexOf('Intron ') === 0))) { rightClick.currentMapItem.title = elem.title; break; } elem = elem.nextSibling; }