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 b7c50a7c..f8020f2b 100755
--- a/js/document/views/design.js
+++ b/js/document/views/design.js
@@ -513,9 +513,11 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
513 // 513 //
514 pauseVideos:{ 514 pauseVideos:{
515 value:function(){ 515 value:function(){
516 var i, videos = this.document.getElementsByTagName("video"); 516 if(this.document) {
517 for(i = 0; i < videos.length; i++){ 517 var i, videos = this.document.getElementsByTagName("video");
518 if(!videos[i].paused) videos[i].pause(); 518 for(i = 0; i < videos.length; i++){
519 if(!videos[i].paused) videos[i].pause();
520 }
519 } 521 }
520 } 522 }
521 }, 523 },
@@ -539,9 +541,28 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, {
539 videos[i].src = ""; 541 videos[i].src = "";
540 } 542 }
541 } 543 }
542 } 544 },
543 //////////////////////////////////////////////////////////////////// 545 ////////////////////////////////////////////////////////////////////
544 //////////////////////////////////////////////////////////////////// 546 ////////////////////////////////////////////////////////////////////
547 toggleWebGlAnimation: {
548 value: function(show) {
549 if(this.document) {
550 var glCanvases = this.document.querySelectorAll('[data-RDGE-id]'),
551 glShapeModel;
552 if(glCanvases) {
553 for(var i = 0, len = glCanvases.length; i<len; i++) {
554 glShapeModel = glCanvases[i].elementModel.shapeModel;
555 if(show) {
556 glShapeModel.GLWorld.restartRenderLoop();
557 } else {
558 glShapeModel.GLWorld.stop();
559 }
560 }
561
562 }
563 }
564 }
565 }
545}); 566});
546//////////////////////////////////////////////////////////////////////// 567////////////////////////////////////////////////////////////////////////
547//////////////////////////////////////////////////////////////////////// \ No newline at end of file 568//////////////////////////////////////////////////////////////////////// \ No newline at end of file