Skip to content

Commit

Permalink
Handle tracks with no name (name == undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Jul 31, 2024
1 parent 230c316 commit a2c697b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions js/trackViewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ class TrackViewport extends Viewport {
this.$zoomInNotice = this.createZoomInNotice(this.$viewport)
}

if (track.name && "sequence" !== track.id) {
if ("sequence" !== track.id) {
this.$trackLabel = $('<div class="igv-track-label">')
this.$viewport.append(this.$trackLabel)
this.setTrackLabel(track.name)
this.setTrackLabel(track.name || "")
if (false === this.browser.doShowTrackLabels) {
this.$trackLabel.hide()
}
Expand Down
8 changes: 1 addition & 7 deletions js/ui/menuUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,7 @@ function trackHeightMenuItem() {
}

function getTrackLabelText(track) {
var vp,
txt

vp = track.trackView.viewports[0]
txt = vp.$trackLabel.text()

return txt
return track.name
}

function canShowColorPicker(track) {
Expand Down

0 comments on commit a2c697b

Please sign in to comment.