Some fine adjustments for display of events right at the edge of the work day

This commit is contained in:
Nathan Gray 2016-03-24 17:28:51 +00:00
parent 11fbdbd34a
commit cd8632e354
2 changed files with 7 additions and 3 deletions

View File

@ -530,11 +530,13 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte
// elem is jquery div of event
function isHidden(elem) {
var docViewTop = timegrid.scrolling.scrollTop(),
// Add an extra 5px top and bottom to include events just on the
// edge of visibility
var docViewTop = timegrid.scrolling.scrollTop() + 5,
docViewBottom = docViewTop + (
this.display_settings.granularity === 0 ?
this.event_wrapper.height() :
timegrid.scrolling.height()
timegrid.scrolling.height() - 10
),
elemTop = elem.position().top,
elemBottom = elemTop + elem.outerHeight(true);

View File

@ -797,7 +797,9 @@ var et2_calendar_timegrid = (function(){ "use strict"; return et2_calendar_view.
// Scroll to start of day
this._top_time = (wd_start * this.rowHeight) / this.options.granularity;
this.scrolling.scrollTop(this._top_time);
// For some reason on Chrome & FF this doesn't quite get the day start
// to the top, so add 2px;
this.scrolling.scrollTop(this._top_time+2);
if(this.rowHeight != old_height)
{