Преглед изворни кода

Add a `getContainerHeight` option

Casey Holzer пре 9 година
родитељ
комит
b09ff709f6
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/Calendar.js

+ 4 - 0
src/Calendar.js

@@ -728,6 +728,10 @@ function Calendar_constructor(element, overrides) {
 	
 	
 	function _calcSize() { // assumes elementVisible
+		if (typeof t.options.getContainerHeight === 'function') {
+			suggestedViewHeight = t.options.getContainerHeight() - (headerElement ? headerElement.outerHeight(true) : 0);
+			return;
+		}
 		if (typeof t.options.contentHeight === 'number') { // exists and not 'auto'
 			suggestedViewHeight = t.options.contentHeight;
 		}