aboutsummaryrefslogtreecommitdiff
path: root/js/document/views/design.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-xjs/document/views/design.js29
1 files changed, 25 insertions, 4 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js
index 44ed2c65..ed98b660 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -537,9 +537,11 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
537 // 537 //
538 pauseVideos:{ 538 pauseVideos:{
539 value:function(){ 539 value:function(){
540 var i, videos = this.document.getElementsByTagName("video"); 540 if(this.document) {
541 for(i = 0; i < videos.length; i++){ 541 var i, videos = this.document.getElementsByTagName("video");
542 if(!videos[i].paused) videos[i].pause(); 542 for(i = 0; i < videos.length; i++){
543 if(!videos[i].paused) videos[i].pause();
544 }
543 } 545 }
544 } 546 }
545 }, 547 },
@@ -563,9 +565,28 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
563 videos[i].src = ""; 565 videos[i].src = "";
564 } 566 }
565 } 567 }
566 } 568 },
567 //////////////////////////////////////////////////////////////////// 569 ////////////////////////////////////////////////////////////////////
568 //////////////////////////////////////////////////////////////////// 570 ////////////////////////////////////////////////////////////////////
571 toggleWebGlAnimation: {
572 value: function(show) {
573 if(this.document) {
574 var glCanvases = this.document.querySelectorAll('[data-RDGE-id]'),
575 glShapeModel;
576 if(glCanvases) {
577 for(var i = 0, len = glCanvases.length; i<len; i++) {
578 glShapeModel = glCanvases[i].elementModel.shapeModel;
579 if(show) {
580 glShapeModel.GLWorld.restartRenderLoop();
581 } else {
582 glShapeModel.GLWorld.stop();
583 }
584 }
585
586 }
587 }
588 }
589 }
569}); 590});
570//////////////////////////////////////////////////////////////////////// 591////////////////////////////////////////////////////////////////////////
571//////////////////////////////////////////////////////////////////////// 592////////////////////////////////////////////////////////////////////////