Fix 12h line labels sometimes did not line up

This commit is contained in:
Nathan Gray 2016-02-05 18:21:31 +00:00
parent abdc5fc06c
commit b1e8044889

View File

@ -723,7 +723,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
if(this.rowHeight < line_height) if(this.rowHeight < line_height)
{ {
// Rows too small for regular label frequency, use automatic calculation // Rows too small for regular label frequency, use automatic calculation
time_label = ( i % Math.ceil(line_height / this.rowHeight) ) === 0 ? time : ''; time_label = ( i % Math.ceil(line_height / this.rowHeight) ) === 0 ? time_label : '';
} }
html += '<div class="calendar_calTimeRowTime et2_clickable" data-time="'+time.trim()+'" data-hour="'+Math.floor(t/60)+'" data-minute="'+(t%60)+'">'+time_label+"</div></div>\n"; html += '<div class="calendar_calTimeRowTime et2_clickable" data-time="'+time.trim()+'" data-hour="'+Math.floor(t/60)+'" data-minute="'+(t%60)+'">'+time_label+"</div></div>\n";
} }