mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-13 22:58:35 +00:00
alt+shift+c to toggle the control bar
This commit is contained in:
parent
055c4652ae
commit
68923a2462
18
main.js
18
main.js
@ -10649,11 +10649,14 @@ var vis = (function() {
|
||||
}
|
||||
|
||||
function keyupListener() {
|
||||
// window.onkeyup = function(e) {
|
||||
window.onkeyup = function(e) {
|
||||
// if ( e.keyCode === 27 ) {
|
||||
// toggleMenuOff();
|
||||
// }
|
||||
// };
|
||||
if (e.altKey && e.shiftKey && e.keyCode === 67 /* C */) {
|
||||
toggleControlBar();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function resizeListener() {
|
||||
@ -10676,6 +10679,17 @@ var vis = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleControlBar() {
|
||||
if (getById("controlButtons").style.display != 'none') {
|
||||
// Dont hardcode style here. Copy it over to data-style before changing to none;
|
||||
getById("controlButtons").dataset.style = getById("controlButtons").style.display;
|
||||
getById("controlButtons").style.display = 'none';
|
||||
} else {
|
||||
// Copy the style over from the data-style attribute.
|
||||
getById("controlButtons").style.display = getById("controlButtons").dataset.style;
|
||||
};
|
||||
}
|
||||
|
||||
function positionMenu(e) {
|
||||
clickCoords = getPosition(e);
|
||||
clickCoordsX = clickCoords.x;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user