mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-08-11 11:18:47 +08:00
call destroy callbacks when the calendar's destroy method is called. misc
This commit is contained in:
+9
-2
@@ -119,7 +119,14 @@ function Calendar(element, options, eventSources) {
|
||||
|
||||
|
||||
function destroy() {
|
||||
|
||||
if (currentView) {
|
||||
trigger('viewDestroy', currentView, currentView, currentView.element);
|
||||
currentView.triggerEventDestroy();
|
||||
}
|
||||
|
||||
$(window).unbind('resize', windowResize);
|
||||
|
||||
header.destroy();
|
||||
content.remove();
|
||||
element.removeClass('fc fc-rtl ui-widget');
|
||||
@@ -208,9 +215,9 @@ function Calendar(element, options, eventSources) {
|
||||
trigger('viewRender', currentView, currentView, currentView.element);
|
||||
currentView.trigger('viewDisplay', _element); // deprecated
|
||||
|
||||
getAndRenderEvents();
|
||||
|
||||
ignoreWindowResize--;
|
||||
|
||||
getAndRenderEvents();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user