aboutsummaryrefslogtreecommitdiff
path: root/js/document/views/base.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-27 17:28:06 -0700
committerNivesh Rajbhandari2012-06-27 17:28:06 -0700
commit2da05a4c71bfe9b136384d9e94fbfbef19f24550 (patch)
treebfa21e77da8722f71fd8d32dc2f768f08a7a7183 /js/document/views/base.js
parent978b9049d057d2a0995758275f68da8641193201 (diff)
downloadninja-2da05a4c71bfe9b136384d9e94fbfbef19f24550.tar.gz
Performance fix for WebGL materials playing even when the dialog/file is no longer in view.
Also pausing videos when switching documents. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/document/views/base.js')
-rwxr-xr-xjs/document/views/base.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/document/views/base.js b/js/document/views/base.js
index d13dce1a..89759195 100755
--- a/js/document/views/base.js
+++ b/js/document/views/base.js
@@ -40,6 +40,7 @@ exports.BaseDocumentView = Montage.create(Component, {
40 if (this.iframe) { 40 if (this.iframe) {
41 this.iframe.style.display = 'block'; 41 this.iframe.style.display = 'block';
42 this.iframe.style.opacity = 1; 42 this.iframe.style.opacity = 1;
43 this.toggleWebGlAnimation(true);
43 } else { 44 } else {
44 console.log('Error: View has no iframe to show!'); 45 console.log('Error: View has no iframe to show!');
45 } 46 }
@@ -54,6 +55,8 @@ exports.BaseDocumentView = Montage.create(Component, {
54 if (this.iframe) { 55 if (this.iframe) {
55 this.iframe.style.display = 'none'; 56 this.iframe.style.display = 'none';
56 this.iframe.style.opacity = 0; 57 this.iframe.style.opacity = 0;
58 this.pauseVideos();
59 this.toggleWebGlAnimation(false);
57 } else { 60 } else {
58 console.log('Error: View has no iframe to hide!'); 61 console.log('Error: View has no iframe to hide!');
59 } 62 }