MCPcopy Create free account
hub / github.com/openscopeproject/InteractiveHtmlBom / changeCanvasLayout

Function changeCanvasLayout

InteractiveHtmlBom/web/ibom.js:865–892  ·  view source on GitHub ↗
(layout)

Source from the content-addressed store, hash-verified

863}
864
865function changeCanvasLayout(layout) {
866 document.getElementById("fl-btn").classList.remove("depressed");
867 document.getElementById("fb-btn").classList.remove("depressed");
868 document.getElementById("bl-btn").classList.remove("depressed");
869 switch (layout) {
870 case 'F':
871 document.getElementById("fl-btn").classList.add("depressed");
872 if (settings.bomlayout != "bom-only") {
873 canvassplit.collapse(1);
874 }
875 break;
876 case 'B':
877 document.getElementById("bl-btn").classList.add("depressed");
878 if (settings.bomlayout != "bom-only") {
879 canvassplit.collapse(0);
880 }
881 break;
882 default:
883 document.getElementById("fb-btn").classList.add("depressed");
884 if (settings.bomlayout != "bom-only") {
885 canvassplit.setSizes([50, 50]);
886 }
887 }
888 settings.canvaslayout = layout;
889 writeStorage("canvaslayout", layout);
890 resizeAll();
891 changeBomMode(settings.bommode);
892}
893
894function populateMetadata() {
895 document.getElementById("title").innerHTML = pcbdata.metadata.title;

Callers 2

changeBomLayoutFunction · 0.85
ibom.jsFile · 0.85

Calls 4

writeStorageFunction · 0.85
resizeAllFunction · 0.85
changeBomModeFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected