فهرست منبع

Including function to clear all sources.

Bruno Melo 9 سال پیش
والد
کامیت
da8f2c41f4
1فایلهای تغییر یافته به همراه10 افزوده شده و 0 حذف شده
  1. 10 0
      src/EventManager.js

+ 10 - 0
src/EventManager.js

@@ -19,6 +19,7 @@ function EventManager(options) { // assumed to be a calendar
 	t.fetchEvents = fetchEvents;
 	t.addEventSource = addEventSource;
 	t.removeEventSource = removeEventSource;
+	t.removeEventSources = removeEventSources;
 	t.updateEvent = updateEvent;
 	t.renderEvent = renderEvent;
 	t.removeEvents = removeEvents;
@@ -294,6 +295,15 @@ function EventManager(options) { // assumed to be a calendar
 		});
 		reportEvents(cache);
 	}
+	
+	
+	function removeEventSources() {
+		 sources = [];
+		 // remove all client events from all sources
+		 cache = [];
+		 
+		 reportEvents(cache);
+	}
 
 
 	function isSourcesEqual(source1, source2) {