From 2da05a4c71bfe9b136384d9e94fbfbef19f24550 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 27 Jun 2012 17:28:06 -0700 Subject: 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 --- js/document/views/base.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/document/views/base.js') 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, { if (this.iframe) { this.iframe.style.display = 'block'; this.iframe.style.opacity = 1; + this.toggleWebGlAnimation(true); } else { console.log('Error: View has no iframe to show!'); } @@ -54,6 +55,8 @@ exports.BaseDocumentView = Montage.create(Component, { if (this.iframe) { this.iframe.style.display = 'none'; this.iframe.style.opacity = 0; + this.pauseVideos(); + this.toggleWebGlAnimation(false); } else { console.log('Error: View has no iframe to hide!'); } -- cgit v1.2.3