Skip to content

Commit

Permalink
Matrix cells title with cmp labels
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Mar 29, 2024
1 parent 579c31b commit 3ac6e03
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions plot/matrix/matrix.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,15 @@ namespace $.$$ {
if (!cell.cmt) return ''

const text = `${cell.cmt}: ${cell.z}`
const title = !this.heatmap()
? `${text} ${cell.z === 1 ? 'entry' : 'entries'}`
: text

return title
if( this.heatmap() ) return text

const links = this.links_map().get( cell.cmt )
const title = `${text} ${cell.z === 1 ? 'entry' : 'entries'}`

if( links?.length == 1 ) return title

return `${title} (${ links?.map( l => this.cmp_labels()[ l.cmp ?? 0 ] ).join('; ') })`
}

@ $mol_action
Expand Down

0 comments on commit 3ac6e03

Please sign in to comment.