59ac146389c04b9e91c3bd7f658a28cb0f5e04d4
markd
  Sun Aug 14 10:12:11 2022 -0700
show full label in label region  (from RMH)

diff --git src/hg/hgTracks/bigRmskTrack.c src/hg/hgTracks/bigRmskTrack.c
index 2ca2623..04736c4 100644
--- src/hg/hgTracks/bigRmskTrack.c
+++ src/hg/hgTracks/bigRmskTrack.c
@@ -1406,60 +1406,63 @@
                                   y + unalignedBlockOffset, black);
                         // extension cap "|---"
                         hvGfxLine(hvg, lx1, y + unalignedBlockOffset - 3, lx1,
                                   y + unalignedBlockOffset + 3, black);
                         }
                     }
                }
 
             if ( showLabels ) 
                 {
                 MgFont *font = tl.font;
                 int fontHeight = tl.fontHeight;
                 int stringWidth =
                      mgFontStringWidth(font, rm->name) + LABEL_PADDING;
 
-                if ( lx1-stringWidth-xOff > 0 ) 
+                if ( lx1-stringWidth-xOff >= -(LABEL_PADDING/2) ) 
                     {
                     hvGfxTextCentered(hvg, lx1 - stringWidth,
                               heightPer - fontHeight + y,
                               stringWidth, fontHeight, MG_BLACK, font,
                               rm->name);
                     rm->leftLabel = 0;
                     }else
                     { 
                     end = rm->alignEnd;
 
                     if ( showUnalignedExtents )
                         {
                         if ((rm->blockSizes[rm->blockCount - 1] * pixelsPerBase) > MAX_UNALIGNED_PIXEL_LEN)
                             {
                             safef(lenLabel, sizeof(lenLabel), "%d",
                                   rm->blockSizes[rm->blockCount - 1]);
                             end += (int) (MAX_UNALIGNED_PIXEL_LEN / pixelsPerBase) +
                                    (int) ((mgFontStringWidth(tl.font, lenLabel) +
                                    LABEL_PADDING) / pixelsPerBase);
                             }
                         else
                             {
                             end += rm->blockSizes[rm->blockCount - 1];
                             }
                         }
 
-                    int endx = roundingScale(rm->visualEnd - winStart,
-                                        width, baseWidth);
-                    if ( endx > 0 ) 
+                    // RMH: Should be no need to scale this.  Both numbers are
+                    //      in bp coordinates.
+                    //int endx = roundingScale(rm->visualEnd - winStart,
+                    //                    width, baseWidth);
+                    //if ( endx > 0 ) 
+                    if ( rm->visualEnd >= winStart )
                         rm->leftLabel = 1;
                     }
                 }
             }
         else if (idx == (rm->blockCount - 1))
             {
             if ( showUnalignedExtents )
                 {
                 /*
                  * Unaligned sequence at the end of an annotation
                  * Draw as:
                  *       -------------|   or        ------//------|
                  *       |                          |
                  *  >>>>>                    >>>>>>>
                  */
@@ -1762,37 +1765,40 @@
 else 
     {
     struct bigRmskRecord *cr;
 int highestLevel = 0;
     for (cr = tg->items; cr != NULL; cr = cr->next)
         {
 if ( cr->layoutLevel > highestLevel )
   highestLevel = cr->layoutLevel;
         if ( cr->leftLabel ) 
             {
             // Break apart the name and get the class of the
             // repeat.
             char family[256];
             // Simplify repClass for lookup: strip trailing '?',
             // simplify *RNA to RNA:
-            char *poundPtr = index(cr->name, '#');
             safecpy(family, sizeof(family), cr->name);
-            if (poundPtr)
-                {
-                poundPtr = index(family, '#');
-                *poundPtr = '\0';
-                }
+            // RMH: For now allow the full name to show in left column.
+            //      If this ends up being too wide we can make it an option
+            //      to only show the identifier as was originally coded:
+            //char *poundPtr = index(cr->name, '#');
+            //if (poundPtr)
+            //    {
+            //    poundPtr = index(family, '#');
+            //    *poundPtr = '\0';
+            //    }
             y = yOffAfterTitle + (cr->layoutLevel * tg->lineHeight) + fontOffset;
             hvGfxSetClip(hvgSide, leftLabelX, y, insideWidth, tg->height);
             hvGfxTextRight(hvgSide, leftLabelX, y, leftLabelWidth-1, 
                            heightPer-fontOffset, color, font, family);
             hvGfxUnclip(hvgSide);
             }
         }
     }
 }
 
 
 void bigRmskMethods(struct track *track, struct trackDb *tdb,
                   int wordCount, char *words[])
 {
 bigBedMethods(track, tdb, wordCount, words);