From bdacc3573a9a9d70ccff5913d303413229982278 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 11 Jan 2016 20:19:45 +0000 Subject: [PATCH] Fix resize while hidden resulted in wrong sizing of time grid / events --- calendar/js/et2_widget_timegrid.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/calendar/js/et2_widget_timegrid.js b/calendar/js/et2_widget_timegrid.js index a01fd5f69f..3d054edb47 100644 --- a/calendar/js/et2_widget_timegrid.js +++ b/calendar/js/et2_widget_timegrid.js @@ -713,6 +713,10 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes _resizeTimes: function() { + if(!this.div.is(':visible')) + { + return; + } var wd_start = 60*this.options.day_start; var wd_end = 60*this.options.day_end; var totalDisplayMinutes = wd_end - wd_start; @@ -1362,7 +1366,7 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes } else { - this._resizeTimes(); + this.resizeTimes(); } },