if (PeakTrack.animate) {
int step = track.getTimeStep();
DataSource[] timeSignalSources = track.getTimeSignalSources();
int idx = Math.min(step, timeSignalSources.length - 1);
DataSource src = timeSignalSources[idx];
if (src != null) {
int top = rect.y + 2;List<LocusScore> timeSignals = src.getSummaryScoresForRange(chr, contextStart, contextEnd, zoom);
Rectangle timeSignalRect = new Rectangle(rect.x, top, rect.width, signalHeight - 1);
chartRenderer.render(timeSignals, context, timeSignalRect, track);
}
} else {
if (track.getDisplayMode() == Track.DisplayMode.EXPANDED) {
DataSource[] timeSignalSources = track.getTimeSignalSources();
if (timeSignalSources != null) {
int top = rect.y + 2;
for (int i = 0; i < timeSignalSources.length; i++) {
DataSource src = timeSignalSources[i];
if (src != null) {
List<LocusScore> timeSignals = src.getSummaryScoresForRange(chr, contextStart, contextEnd, zoom);
Rectangle timeSignalRect = new Rectangle(rect.x, top, rect.width, signalHeight - 1);
chartRenderer.render(timeSignals, context, timeSignalRect, track);
}
top += h;