diff --git a/InteractiveHtmlBom/web/ibom.html b/InteractiveHtmlBom/web/ibom.html index facb5729..e0adc402 100644 --- a/InteractiveHtmlBom/web/ibom.html +++ b/InteractiveHtmlBom/web/ibom.html @@ -55,6 +55,10 @@ Dark mode + + + Full Screen + Show footprint pads diff --git a/InteractiveHtmlBom/web/ibom.js b/InteractiveHtmlBom/web/ibom.js index 16d9902d..59265e19 100644 --- a/InteractiveHtmlBom/web/ibom.js +++ b/InteractiveHtmlBom/web/ibom.js @@ -72,6 +72,14 @@ function setDarkMode(value) { redrawIfInitDone(); } +function setFullscreen(value) { + if (value) { + document.documentElement.requestFullscreen(); + } else { + document.exitFullscreen(); + } +} + function fabricationVisible(value) { writeStorage("fabricationVisible", value); settings.renderFabrication = value; @@ -936,6 +944,12 @@ window.onload = function(e) { prepCheckboxes(); // Triggers render changeBomLayout(settings.bomlayout); + + // Users may leave fullscreen without touching the checkbox. Uncheck. + document.addEventListener('fullscreenchange', () => { + if (!document.fullscreenElement) + document.getElementById('fullscreenCheckbox').checked = false; + }); } window.onresize = resizeAll;