Tachyon
Tachyon copied to clipboard
EventTimeRanges shorter than 15min are drawn at the end of the Dayview
I found the issue in DayView.java::setEventRects():
int filteredStartMinute = Math.max(startMinute, timeRange.startMinute);
int duration = Math.min(endMinute, timeRange.endMinute) - filteredStartMinute;
if (duration < MIN_DURATION_MINUTES) {
duration = MIN_DURATION_MINUTES;
filteredStartMinute = endMinute - duration;
}
MIN_DURATION_MINUTES is 15min and endMinute is 11:59pm, so if duration is ever less than the minimum, it is drawn as a DirectionalRect from 11:44pm - 11:59pm.
I may be misinterpreting the intention here, but I suspect that filteredStartMinute should be reassigned relative to the timeRange.endMinute, not this.endMinute. IE:
if (duration < MIN_DURATION_MINUTES) {
duration = MIN_DURATION_MINUTES;
filteredStartMinute = timeRange.endMinute - duration;
}
See my PR for a fix here: https://github.com/linkedin/Tachyon/pull/13