MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / toggle

Function toggle

src/handlers/quickTools.js:407–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

405}
406
407function toggle() {
408 // if search is active, remove it
409 const searchBar = actionStack.get("search-bar");
410 if (searchBar?.action) {
411 searchBar.action();
412 return;
413 }
414
415 const $footer = quickTools.$footer;
416 const $row1 = quickTools.$row1;
417 const $row2 = quickTools.$row2;
418
419 if (!$footer.contains($row1)) {
420 setHeight();
421 } else if (!$footer.contains($row2)) {
422 setHeight(2);
423 } else {
424 setHeight(0);
425 }
426 focusEditor();
427}
428
429function setHeight(height = 1, save = true) {
430 const { $footer, $row1, $row2 } = quickTools;

Callers 1

actionsFunction · 0.70

Calls 3

focusEditorFunction · 0.85
setHeightFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected