Просмотр исходного кода

fix for Issue 235 - shrink calendar height if there is leftover space

igor.vaynberg 15 лет назад
Родитель
Сommit
770f5ff0ba
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      src/agenda.js

+ 6 - 0
src/agenda.js

@@ -295,6 +295,12 @@ function Agenda(element, options, methods, viewName) {
 			height: height
 		});
 		
+		// if the table ends up shorter than the allotted view, shrink the view to fit the table
+		var tableHeight=body.find('table:first').height();
+		if (tableHeight<body.height()) {
+			body.height(tableHeight);
+		}
+		
 		if (dateChanged) {
 			resetScroll();
 		}