浏览代码

MathJax3: allow non-singleton Reveal instance

Wang Guan 1 年之前
父节点
当前提交
19c1bca1e4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      plugin/math/mathjax3.js

+ 2 - 2
plugin/math/mathjax3.js

@@ -21,7 +21,7 @@ export const MathJax3 = () => {
             ready: () => {
             ready: () => {
                 MathJax.startup.defaultReady();
                 MathJax.startup.defaultReady();
                 MathJax.startup.promise.then(() => {
                 MathJax.startup.promise.then(() => {
-                    Reveal.layout();
+                    deck.layout();
                 });
                 });
             }
             }
         }
         }
@@ -66,7 +66,7 @@ export const MathJax3 = () => {
 
 
             loadScript( url, function() {
             loadScript( url, function() {
                 // Reprocess equations in slides when they turn visible
                 // Reprocess equations in slides when they turn visible
-                Reveal.addEventListener( 'slidechanged', function( event ) {
+                deck.addEventListener( 'slidechanged', function( event ) {
                     MathJax.typeset();
                     MathJax.typeset();
                 } );
                 } );
             } );
             } );