Adam Shaw hace 8 años
padre
commit
623ca5c12f
Se han modificado 1 ficheros con 21 adiciones y 2 borrados
  1. 21 2
      src/EventManager.js

+ 21 - 2
src/EventManager.js

@@ -143,17 +143,36 @@ function EventManager() { // assumed to be a calendar
 
 		if (pendingSourceCnt) {
 			return Promise.construct(function(resolve) {
-				console.log(eventDefCollection.buildPeriods(rangeStart, rangeEnd));
+				debugEventDefCollection();
 				t.one('eventsReceived', resolve);
 			});
 		}
 		else { // executed all synchronously, or no sources at all
-			console.log(eventDefCollection.buildPeriods(rangeStart, rangeEnd));
+			debugEventDefCollection();
 			return Promise.resolve(cache);
 		}
 	}
 
 
+	function debugEventDefCollection() {
+		var ranges = eventDefCollection.buildRenderRanges(rangeStart, rangeEnd, t);
+		var i, range;
+
+		console.log('ranges');
+		console.log('------------------');
+
+		for (i = 0; i < ranges.length; i++) {
+			range = ranges[i];
+
+			console.log(range.eventInstance.eventDefinition.title);
+			console.log(' isStart', range.isStart);
+			console.log(' isEnd', range.isEnd);
+		}
+
+		console.log();
+	}
+
+
 	// fetches an event source and processes its result ONLY if it is still the current fetch.
 	// caller is responsible for incrementing pendingSourceCnt first.
 	function tryFetchEventSource(source, fetchId) {