summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorWu Cheng-Han2016-12-18 22:53:31 +0800
committerWu Cheng-Han2016-12-18 22:53:31 +0800
commit1892fe70f679d2793263ec2a71d8f15aeecc167e (patch)
tree466b67346b7995973a0835a929077478d7c66848 /public
parent3eb2159ded76ec80b747a2436293c340925e4ef9 (diff)
Fix slide mode on print pdf not finish view rendering
Diffstat (limited to '')
-rw-r--r--public/js/slide.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/public/js/slide.js b/public/js/slide.js
index 4962470e..1ff388a5 100644
--- a/public/js/slide.js
+++ b/public/js/slide.js
@@ -107,13 +107,21 @@ window.viewAjaxCallback = function () {
};
function renderSlide(event) {
- var markdown = $(event.currentSlide);
- if (!markdown.attr('data-rendered')) {
+ if (window.location.search.match( /print-pdf/gi )) {
+ var slides = $('.slides');
var title = document.title;
- finishView(markdown);
- markdown.attr('data-rendered', 'true');
+ finishView(slides);
document.title = title;
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();
+ }
}
}