mirror of https://github.com/status-im/codimd.git
Update slide ready and change event to improve performance
This commit is contained in:
parent
8124d6f2d6
commit
29d198def9
|
@ -98,12 +98,15 @@ function renderSlide(event) {
|
|||
markdown.attr('data-rendered', 'true');
|
||||
document.title = title;
|
||||
Reveal.layout();
|
||||
}
|
||||
}
|
||||
|
||||
Reveal.addEventListener('ready', function (event) {
|
||||
renderSlide(event);
|
||||
var markdown = $(event.currentSlide);
|
||||
// force browser redraw
|
||||
setTimeout(function () {
|
||||
markdown.hide().show(0);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reveal.addEventListener('ready', renderSlide);
|
||||
});
|
||||
Reveal.addEventListener('slidechanged', renderSlide);
|
Loading…
Reference in New Issue