Przeglądaj źródła

dont care about height freeze/thaw depth. because no more nested rendering

Adam Shaw 8 lat temu
rodzic
commit
6e725e27ee
1 zmienionych plików z 10 dodań i 16 usunięć
  1. 10 16
      src/Calendar.js

+ 10 - 16
src/Calendar.js

@@ -1034,28 +1034,22 @@ function Calendar_constructor(element, overrides) {
 	t.freezeContentHeight = freezeContentHeight;
 	t.thawContentHeight = thawContentHeight;
 
-	var freezeContentHeightDepth = 0;
-
 
 	function freezeContentHeight() {
-		if (!(freezeContentHeightDepth++)) {
-			content.css({
-				width: '100%',
-				height: content.height(),
-				overflow: 'hidden'
-			});
-		}
+		content.css({
+			width: '100%',
+			height: content.height(),
+			overflow: 'hidden'
+		});
 	}
 
 
 	function thawContentHeight() {
-		if (!(--freezeContentHeightDepth)) {
-			content.css({
-				width: '',
-				height: '',
-				overflow: ''
-			});
-		}
+		content.css({
+			width: '',
+			height: '',
+			overflow: ''
+		});
 	}