From bc0883f8f0fe42b3a46f3f4adc082cc1ccb471bb Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Sat, 31 Aug 2013 22:04:24 -0700 Subject: [PATCH] fix agenda selection alignment when cell height is customized (issue 1035) --- src/agenda/AgendaView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/agenda/AgendaView.js b/src/agenda/AgendaView.js index d9c45bb..45c4e88 100644 --- a/src/agenda/AgendaView.js +++ b/src/agenda/AgendaView.js @@ -98,7 +98,6 @@ function AgendaView(element, calendar, viewName) { var slotContainer; var slotSegmentContainer; var slotTable; - var slotTableFirstInner; var selectionHelper; var viewWidth; @@ -263,7 +262,6 @@ function AgendaView(element, calendar, viewName) { "" + ""; slotTable = $(s).appendTo(slotContainer); - slotTableFirstInner = slotTable.find('div:first'); slotBind(slotTable.find('td')); } @@ -447,7 +445,9 @@ function AgendaView(element, calendar, viewName) { slotScroller.height(bodyHeight - allDayHeight - 1); - slotHeight = slotTableFirstInner.height() + 1; // +1 for border + // the stylesheet guarantees that the first row has no border. + // this allows .height() to work well cross-browser. + slotHeight = slotTable.find('tr:first').height() + 1; // +1 for bottom border snapRatio = opt('slotMinutes') / snapMinutes; snapHeight = slotHeight / snapRatio;