d6f2b2dfc3960ffa2d4a54e47508f4c7a773abc0 hiram Tue Nov 17 08:12:26 2020 -0800 delay popup time set to 0.2 seconds and restore correct data construction function in wigTrack.c refs #21980 diff --git src/hg/hgTracks/wigTrack.c src/hg/hgTracks/wigTrack.c index b8f1c35..5375908 100644 --- src/hg/hgTracks/wigTrack.c +++ src/hg/hgTracks/wigTrack.c @@ -856,52 +856,52 @@ int x1; int h = tg->lineHeight; /* the height of our drawing window */ double scaleFactor = h/graphRange; Color oldDrawColor = colorArray[0] + 1; /* Just to be different from 1st drawColor. */ Color mediumColor = MG_BLACK; // Will be overriden Color lightColor = MG_BLACK; // Will be overriden Color clipColor = MG_MAGENTA; enum wiggleTransformFuncEnum transformFunc = wigCart->transformFunc; enum wiggleGraphOptEnum lineBar = wigCart->lineBar; boolean whiskers = (wigCart->windowingFunction == wiggleWindowingWhiskers && width < winEnd-winStart); struct wigMouseOver *mouseOverData = NULL; /* list of mouse over data, if created here */ boolean skipMouseOvers = TRUE; /* assuming not using */ +int mouseOverX2 = -1; +double previousValue = 0; if (enableMouseOver) skipMouseOvers = FALSE; /* right now this is a simple pixel by pixel loop. Future * enhancements could draw boxes where pixels * are all the same height in a run. */ for (x1 = 0; x1 < width; ++x1) { int x = x1 + xOff; int preDrawIndex = x1 + preDrawZero; struct preDrawElement *p = &preDraw[preDrawIndex]; /* ===== mouseOver calculations===== */ if (enableMouseOver) { - int mouseOverX2 = -1; - double previousValue = 0; if (!skipMouseOvers && (p->count > 0)) /* checking mouseOver construction */ { if (p->count > 0) /* allow any number of values to display */ { - double thisValue = p->sumData/p->count; /* average if 2 */ + double thisValue = p->sumData/p->count; /*average if count > 1*/ if (mouseOverX2 < 0) /* first valid data found */ { struct wigMouseOver *dataItem; AllocVar(dataItem); mouseOverX2 = x1+1; dataItem->x1 = x1; dataItem->x2 = mouseOverX2; dataItem->value = thisValue; dataItem->valueCount = p->count; slAddHead(&mouseOverData, dataItem); previousValue = thisValue; } else /* see if we need a new item */ { #define epsilonLimit 1.0e-6