Fix slide mode on print pdf not finish view rendering
This commit is contained in:
parent
3eb2159ded
commit
1892fe70f6
1 changed files with 12 additions and 4 deletions
|
@ -107,13 +107,21 @@ window.viewAjaxCallback = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
function renderSlide(event) {
|
function renderSlide(event) {
|
||||||
var markdown = $(event.currentSlide);
|
if (window.location.search.match( /print-pdf/gi )) {
|
||||||
if (!markdown.attr('data-rendered')) {
|
var slides = $('.slides');
|
||||||
var title = document.title;
|
var title = document.title;
|
||||||
finishView(markdown);
|
finishView(slides);
|
||||||
markdown.attr('data-rendered', 'true');
|
|
||||||
document.title = title;
|
document.title = title;
|
||||||
Reveal.layout();
|
Reveal.layout();
|
||||||
|
} else {
|
||||||
|
var markdown = $(event.currentSlide);
|
||||||
|
if (!markdown.attr('data-rendered')) {
|
||||||
|
var title = document.title;
|
||||||
|
finishView(markdown);
|
||||||
|
markdown.attr('data-rendered', 'true');
|
||||||
|
document.title = title;
|
||||||
|
Reveal.layout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue