diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-17 12:41:33 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-17 12:41:33 -0700 |
commit | 44a171d6e1582cbf23227d3bf5c5dd260d5d12f1 (patch) | |
tree | bb3128cf8ac6cc4dcf308f452906bd2b3884f1d7 /src/library_browser.js | |
parent | fc1b49cd5ed55a4633e49665a9e17047af3619ca (diff) |
make fullscreen handling closure friendly
Diffstat (limited to 'src/library_browser.js')
-rw-r--r-- | src/library_browser.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/library_browser.js b/src/library_browser.js index 97233c36..5f9c4d06 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -311,10 +311,10 @@ mergeInto(LibraryManager.library, { lockPointer: undefined, resizeCanvas: undefined, requestFullScreen: function(lockPointer, resizeCanvas) { - this.lockPointer = lockPointer; - this.resizeCanvas = resizeCanvas; - if (typeof this.lockPointer === 'undefined') this.lockPointer = true; - if (typeof this.resizeCanvas === 'undefined') this.resizeCanvas = false; + Browser.lockPointer = lockPointer; + Browser.resizeCanvas = resizeCanvas; + if (typeof Browser.lockPointer === 'undefined') Browser.lockPointer = true; + if (typeof Browser.resizeCanvas === 'undefined') Browser.resizeCanvas = false; var canvas = Module['canvas']; function fullScreenChange() { @@ -335,8 +335,8 @@ mergeInto(LibraryManager.library, { if (Module['onFullScreen']) Module['onFullScreen'](Browser.isFullScreen); } - if (!this.fullScreenHandlersInstalled) { - this.fullScreenHandlersInstalled = true; + if (!Browser.fullScreenHandlersInstalled) { + Browser.fullScreenHandlersInstalled = true; document.addEventListener('fullscreenchange', fullScreenChange, false); document.addEventListener('mozfullscreenchange', fullScreenChange, false); document.addEventListener('webkitfullscreenchange', fullScreenChange, false); |