Skip to content

Commit 1892fe7

Browse files
committed
Fix slide mode on print pdf not finish view rendering
1 parent 3eb2159 commit 1892fe7

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

public/js/slide.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,21 @@ window.viewAjaxCallback = function () {
107107
};
108108

109109
function renderSlide(event) {
110-
var markdown = $(event.currentSlide);
111-
if (!markdown.attr('data-rendered')) {
110+
if (window.location.search.match( /print-pdf/gi )) {
111+
var slides = $('.slides');
112112
var title = document.title;
113-
finishView(markdown);
114-
markdown.attr('data-rendered', 'true');
113+
finishView(slides);
115114
document.title = title;
116115
Reveal.layout();
116+
} else {
117+
var markdown = $(event.currentSlide);
118+
if (!markdown.attr('data-rendered')) {
119+
var title = document.title;
120+
finishView(markdown);
121+
markdown.attr('data-rendered', 'true');
122+
document.title = title;
123+
Reveal.layout();
124+
}
117125
}
118126
}
119127

0 commit comments

Comments
 (0)