Commit 6abf9ab9 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Merge branch 'prakhar/purr-data-view_fullscr' into emscripten

parents d2eb37e5 621999d4
Pipeline #3565 canceled with stage
......@@ -88,6 +88,35 @@ function load_menu_actions(){
}
});
// View entries
minit("view-fullscreen",{onclick:
function(){
if (!document.fullscreenElement &&
!document.mozFullScreenElement &&
!document.webkitFullscreenElement &&
!document.msFullscreenElement ) {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
}
}
}});
// Media entries
minit("media-test",{onclick: function(){pdbundle.pdgui.web_pd_doc_open("doc/7.stuff/tools", "testtone.pd")}});
......@@ -149,8 +178,10 @@ function add_shortcuts(cid){
// Add key
shortcut += e.key.toUpperCase();
if(window.shortkeys[cid].hasOwnProperty(shortcut)){
e.preventDefault()
window.shortkeys[cid][shortcut].click();
if (shortcut!=="F11") {
e.preventDefault();
window.shortkeys[cid][shortcut].click();
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment