LT-326: Show all series of a study after loading it in Studies Sidebar (moving original logic to newly created method)

This commit is contained in:
Emanuel F. Oliveira 2016-11-15 20:48:23 -02:00
parent e70cc254ad
commit 60deb9c070

View File

@ -25,13 +25,6 @@ const initializeStudyWrapper = instance => {
$thumbnails.css('max-height', '');
$thumbnails.css('max-height', $thumbnails.height());
$study.removeClass('active');
};
// Initialize the study wrapper max-height to enable CSS transition
Template.studyTimepointStudy.onRendered(() => {
const instance = Template.instance();
initializeStudyWrapper(instance);
// Here we add, remove, and add the active class again because this way
// the max-height animation appears smooth to the user.
@ -40,6 +33,14 @@ Template.studyTimepointStudy.onRendered(() => {
$study.addClass('active');
}, 1);
}
};
// Initialize the study wrapper max-height to enable CSS transition
Template.studyTimepointStudy.onRendered(() => {
const instance = Template.instance();
initializeStudyWrapper(instance);
});
Template.studyTimepointStudy.helpers({