@@ -47,6 +47,10 @@ function writeTrackLabelContainer(ideo) {
4747 . style ( 'line-height' , '10px' )
4848}
4949
50+ /**
51+ * Get label text for displayed tracks from annotation container metadata,
52+ * heatmap keys, or annotation container keys
53+ */
5054function getLabels ( ideo ) {
5155 var annotKeys , labels , heatmaps , i ;
5256
@@ -74,6 +78,9 @@ function getLabels(ideo) {
7478 return labels ;
7579}
7680
81+ /**
82+ * Display track labels on the page
83+ */
7784function renderTrackLabels ( top , left , ideo ) {
7885 d3 . select ( ideo . config . container + ' #_ideogramTrackLabel' )
7986 . style ( 'opacity' , 1 ) // Make label visible
@@ -90,6 +97,9 @@ function renderTrackLabels(top, left, ideo) {
9097 } ) ;
9198}
9299
100+ /**
101+ * Get left and top (x and y) offset for track label text
102+ */
93103function getTrackLabelOffsets ( labels , trackCanvas , ideo ) {
94104 var labels , firstTrackId , firstTrack , trackBox , labelBox , ideoBox , left , top ,
95105 marginHack = 7 ; // TODO: Make this dynamic
@@ -111,6 +121,9 @@ function getTrackLabelOffsets(labels, trackCanvas, ideo) {
111121 return [ left , top ] ;
112122}
113123
124+ /**
125+ * Show the track label for this track
126+ */
114127function showTrackLabel ( trackCanvas , ideo ) {
115128 var labels , left , top ;
116129
0 commit comments