a8729cf45b0f11e737f376c2c1baf61b9cb2cf50 hiram Tue Nov 10 09:27:37 2020 -0800 correct font size when computing maximumWidth refs #21980 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index ea4734b..d0e7511 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -4735,30 +4735,31 @@ if (lenV > lengthLongestNumberString) { lengthLongestNumberString = lenV; longestNumber = arr[trackName][span].v; } mouseOver.spans[trackName].push(arr[trackName][span]); ++itemCount; } mouseOver.tracks[trackName] = itemCount; // merely for debugging watch var mouseOverValue = ""; if (hasMean) { mouseOverValue = " mean: " + longestNumber + " "; } else { mouseOverValue = " " + longestNumber + " "; } $('#mouseOverText').html(mouseOverValue); // see how big as rendered + $('#mouseOverText').css('fontSize',mouseOver.browserTextSize); var maximumWidth = Math.ceil($('#mouseOverText').width()); $('#mouseOverText').html("no data"); // might be bigger if (Math.ceil($('#mouseOverText').width() > maximumWidth)) { maximumWidth = Math.ceil($('#mouseOverText').width()); } mouseOver.maximumWidth[trackName] = maximumWidth; } }, // receiveData: function (arr) failedRequest: function(trackName) { // failed request to get json data, remove it from the track list if (mouseOver.tracks[trackName]) { delete mouseOver.tracks[trackName]; } },