Преглед на файлове

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe преди 7 години
родител
ревизия
8cc11a8576
променени са 2 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 4 0
      Viewer/src/templating/templateManager.ts
  2. 2 1
      Viewer/src/viewer/defaultViewer.ts

+ 4 - 0
Viewer/src/templating/templateManager.ts

@@ -379,6 +379,10 @@ export class Template {
         }
     }
 
+    public redraw() {
+        this.updateParams({});
+    }
+
     /**
      * Get the template'S configuration
      */

+ 2 - 1
Viewer/src/viewer/defaultViewer.ts

@@ -57,8 +57,9 @@ export class DefaultViewer extends AbstractViewer {
         }
         if (plugin.addHTMLTemplate) {
             template.onHTMLRendered.add((tmpl) => {
-                plugin.addHTMLTemplate && plugin.addHTMLTemplate(tmpl);
+                plugin.addHTMLTemplate!(tmpl);
             });
+            template.redraw();
         }
 
         if (plugin.eventsToAttach) {