|
@@ -34,7 +34,7 @@
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
// Move the tripal pane to the first position when its TOC item is clicked.
|
|
|
$('.tripal_pane-toc-list-item-link').each(function (i) {
|
|
|
var id = '.tripal_pane-fieldset-' + $(this).attr('id');
|
|
@@ -63,6 +63,18 @@
|
|
|
// Trigger expansion event to allow the pane content
|
|
|
// to react to the size change
|
|
|
$(id).trigger($.Event('tripal_ds_pane_expanded', {id: id}));
|
|
|
+
|
|
|
+ // Trigger a window resize event to notify charting modules that
|
|
|
+ // the container dimensions has changed
|
|
|
+ if (typeof Event !== 'undefined') {
|
|
|
+ window.dispatchEvent(new Event('resize'));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // Support IE
|
|
|
+ var event = window.document.createEvent('UIEvents');
|
|
|
+ event.initUIEvent('resize', true, false, window, 0);
|
|
|
+ window.dispatchEvent(event);
|
|
|
+ }
|
|
|
});
|
|
|
return false;
|
|
|
});
|