Update slide ready and change event to improve performance
This commit is contained in:
parent
8124d6f2d6
commit
29d198def9
1 changed files with 9 additions and 6 deletions
|
@ -98,12 +98,15 @@ function renderSlide(event) {
|
|||
markdown.attr('data-rendered', 'true');
|
||||
document.title = title;
|
||||
Reveal.layout();
|
||||
// force browser redraw
|
||||
setTimeout(function () {
|
||||
markdown.hide().show(0);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reveal.addEventListener('ready', renderSlide);
|
||||
Reveal.addEventListener('slidechanged', renderSlide);
|
||||
Reveal.addEventListener('ready', function (event) {
|
||||
renderSlide(event);
|
||||
var markdown = $(event.currentSlide);
|
||||
// force browser redraw
|
||||
setTimeout(function () {
|
||||
markdown.hide().show(0);
|
||||
}, 0);
|
||||
});
|
||||
Reveal.addEventListener('slidechanged', renderSlide);
|
||||
|
|
Loading…
Reference in a new issue