MCPcopy Create free account
hub / github.com/32comic/image2pixel-web / updateBlueprintCheckboxVisibility

Function updateBlueprintCheckboxVisibility

web/js/main.js:824–837  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

822const HEADER_HEIGHT = 32;
823
824function updateBlueprintCheckboxVisibility() {
825 const toggle = document.getElementById('blueprintToggle');
826 if (!toggle) return;
827
828 const hasCodeMap = selectedPalette && selectedPalette.meta && selectedPalette.meta.codeMap && Object.keys(selectedPalette.meta.codeMap).length > 0;
829 const show = hasCodeMap && processedImage !== null;
830
831 toggle.style.display = show ? 'inline-flex' : 'none';
832 if (!hasCodeMap) {
833 const cb = document.getElementById('blueprintCheckbox');
834 if (cb) cb.checked = false;
835 isBlueprintMode = false;
836 }
837}
838
839document.getElementById('blueprintCheckbox')?.addEventListener('change', function() {
840 isBlueprintMode = this.checked;

Callers 3

main.jsFile · 0.85
createPaletteCardFunction · 0.85
processImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected