ab64e884e099ac67de02d4b23e87dbe2d72eebd9 braney Wed Oct 19 15:41:57 2022 -0700 mouseovers for wiggles show the value being graphed, not (necessarily) the mean. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 891f1b1..5a3f56c 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -4777,36 +4777,32 @@ if (hgTracks.revCmplDisp) { graphOffset = Math.max(0, tdRight - clientX); } var windowUp = false; // see if window is supposed to become visible var foundIdx = -1; if (mouseOver.items[trackName]) { foundIdx = mouseOver.findRange(graphOffset, mouseOver.items[trackName]); } // can show 'no data' when not found var mouseOverValue = mouseOver.noDataString; if (mouseOver.mouseOverFunction[trackName] === "noAverage") { mouseOverValue = mouseOver.noAverageString; } if (foundIdx > -1) { // value to display - if (mouseOver.items[trackName][foundIdx].c > 1) { - mouseOverValue = " ~ " + mouseOver.items[trackName][foundIdx].v + " "; - } else { mouseOverValue = " " + mouseOver.items[trackName][foundIdx].v + " "; } - } $('#mouseOverText').html(mouseOverValue); var msgWidth = mouseOver.maximumWidth[trackName]; $('#mouseOverText').width(msgWidth); var msgHeight = Math.ceil($('#mouseOverText').height()); var lineHeight = Math.max(0, tdHeight - msgHeight); if (tdTop < 0) { lineHeight = Math.max(0, tdHeight + tdTop - msgHeight); } var msgLeft = Math.max(tdLeft, clientX - (msgWidth/2) - 3); // with magic 3 var msgTop = Math.max(0, tdTop); var lineTop = Math.max(0, msgTop + msgHeight); var lineLeft = Math.max(0, clientX - 1); // magic 3 + 2 for width of indicator box if (clientY < msgTop + msgHeight) { // cursor overlaps with the msg box msgLeft = clientX - msgWidth - 6; // to the left of the cursor if (msgLeft < tdLeft || msgLeft < 0) { // hits left edge, switch