447513356fcfa684846bdd1b63476e68d9c17ce9 chmalee Thu Apr 6 09:04:41 2023 -0700 Add code to create tooltips under our control. Convert title attributes on hgTracks into these tooltips diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index ff200cf..881a7e4 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -3872,44 +3872,50 @@ dragReorder.init(); dragSelect.load(false); // Do NOT reload context menu (otherwise we get the "context menu sticks" problem). // rightClick.load($('#tr_' + id)); if (imageV2.imgTbl.tableDnDUpdate) imageV2.imgTbl.tableDnDUpdate(); rightClick.reloadFloatingItem(); // Turn on drag scrolling. if (hgTracks.imgBoxPortal) { $("div.scroller").panImages(); } if (imageV2.backSupport) { if (id) { // The remainder is only needed for full reload imageV2.markAsDirtyPage(); // vis of cfg change imageV2.drawHighlights(); + if (typeof showMouseovers !== 'undefined' && showMouseovers) { + convertTitleTagsToMouseovers(); + } return; } } imageV2.loadRemoteTracks(); makeItemsByDrag.load(); imageV2.loadSuggestBox(); imageV2.drawHighlights(); if (imageV2.backSupport) { imageV2.setInHistory(false); // Set this new position into History stack } else { imageV2.markAsDirtyPage(); } + if (typeof showMouseovers !== 'undefined' && showMouseovers) { + convertTitleTagsToMouseovers(); + } }, updateImgForId: function (html, id, fullImageReload, newJsonRec) { // update row in imgTbl for given id. // return true if we successfully pull slice for id and update it in imgTrack. var newTr = $(html).find("tr[id='tr_" + id + "']"); if (newTr.length > 0) { var tr = $(document.getElementById("tr_" + id)); if (tr.length > 0) { $(tr).html(newTr.children()); // Need to update tr class list too var classes = $(html).find("tr[id='tr_"+ id + "']")[0].className; if (classes && classes.length > 0) { $(tr).removeClass(); @@ -4117,30 +4123,31 @@ if ( ! stripped.warnMsg ) warn("hgTracks object is missing from the response"); } else { if (this.id) { if (newJson.trackDb[this.id]) { var visibility = vis.enumOrder[newJson.trackDb[this.id].visibility]; var limitedVis; if (newJson.trackDb[this.id].limitedVis) limitedVis = vis.enumOrder[newJson.trackDb[this.id].limitedVis]; if (this.newVisibility && limitedVis && this.newVisibility !== limitedVis) // see redmine 1333#note-9 alert("There are too many items to display the track in " + this.newVisibility + " mode."); var rec = oldJson.trackDb[this.id]; rec.limitedVis = newJson.trackDb[this.id].limitedVis; + rec.imgOffsetY = newJson.trackDb[this.id].imgOffsetY; vis.update(this.id, visibility); if (visibility === "hide") cart.updateSessionPanel(); // notify when vis change to hide track valid = true; } else { // what got returned from the AJAX request was a different // set of tracks. Let's do a reload and hope for the best imageV2.fullReload(); } } else { valid = true; } suggestBox.restoreWatermark(getDb(), $("#suggestTrack").length > 0); @@ -5287,60 +5294,74 @@ maxWidth: popMaxWidth, modal: true, closeOnEscape: true, autoOpen: false, buttons: downloadTrackDataButtons }); } htmlStr = "
Use this selection window to download track data" + " for the current region (" + genomePos.get() + "). Please note that large regions" + " may be slow to download.
"; htmlStr += "