mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 06:14:20 -05:00
Update to make removeDOMEvents only process once in slide mode
This commit is contained in:
parent
19a64f6b06
commit
afc4f269bc
1 changed files with 1 additions and 2 deletions
|
@ -49,6 +49,7 @@ const deps = [{
|
||||||
const slides = window.RevealMarkdown.slidify(body, slideOptions)
|
const slides = window.RevealMarkdown.slidify(body, slideOptions)
|
||||||
$('.slides').html(slides)
|
$('.slides').html(slides)
|
||||||
window.RevealMarkdown.initialize()
|
window.RevealMarkdown.initialize()
|
||||||
|
removeDOMEvents($('.slides'))
|
||||||
$('.slides').show()
|
$('.slides').show()
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
@ -109,7 +110,6 @@ function renderSlide (event) {
|
||||||
if (window.location.search.match(/print-pdf/gi)) {
|
if (window.location.search.match(/print-pdf/gi)) {
|
||||||
const slides = $('.slides')
|
const slides = $('.slides')
|
||||||
let title = document.title
|
let title = document.title
|
||||||
removeDOMEvents(slides)
|
|
||||||
finishView(slides)
|
finishView(slides)
|
||||||
document.title = title
|
document.title = title
|
||||||
Reveal.layout()
|
Reveal.layout()
|
||||||
|
@ -117,7 +117,6 @@ function renderSlide (event) {
|
||||||
const markdown = $(event.currentSlide)
|
const markdown = $(event.currentSlide)
|
||||||
if (!markdown.attr('data-rendered')) {
|
if (!markdown.attr('data-rendered')) {
|
||||||
let title = document.title
|
let title = document.title
|
||||||
removeDOMEvents(markdown)
|
|
||||||
finishView(markdown)
|
finishView(markdown)
|
||||||
markdown.attr('data-rendered', 'true')
|
markdown.attr('data-rendered', 'true')
|
||||||
document.title = title
|
document.title = title
|
||||||
|
|
Loading…
Reference in a new issue