diff --git a/main.js b/main.js index ee187c3..155ad38 100644 --- a/main.js +++ b/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;