Change clinicalTimeline to a function factory. This way previous environments
of the closure are not overridden on consecutive calls. Another solution would
have been to use prototypes, but since we don't instantiate a ton of timelines
at one page it might not be that much faster than using a closure. See also
performance of prototype vs closure in different browsers:
https://ssobczak.wordpress.com/2014/02/16/prototype-vs-closure-js/
Changes proposed in this pull request:
Change clinical timeline to function factory
Add more timelines in examples.html
Fix bug in exporting thereby supporting export of multiple timelines on a single page
[x] Make sure your commit messages end with a Signed-off-by string (this line
can be automatically added by git if you run the git-commit command with
the -s option).
Fix #102 multiple timelines on single page
Fix #102.
Change clinicalTimeline to a function factory. This way previous environments of the closure are not overridden on consecutive calls. Another solution would have been to use prototypes, but since we don't instantiate a ton of timelines at one page it might not be that much faster than using a closure. See also performance of prototype vs closure in different browsers: https://ssobczak.wordpress.com/2014/02/16/prototype-vs-closure-js/
Changes proposed in this pull request:
Checks
git-commit
command with the-s
option).Notify reviewers
@rohangoel96