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

Function adjustFontSize

src/cm/commandRegistry.js:1404–1411  ·  view source on GitHub ↗
(delta)

Source from the content-addressed store, hash-verified

1402}
1403
1404function adjustFontSize(delta) {
1405 const current = settings?.value?.fontSize || "12px";
1406 const numeric = Number.parseInt(current, 10) || 12;
1407 const next = Math.min(72, Math.max(6, numeric + delta));
1408 settings.value.fontSize = `${next}px`;
1409 settings.update(false);
1410 return true;
1411}
1412
1413function adjustUiZoom(delta) {
1414 const current = Number(settings?.value?.uiZoom) || 100;

Callers 1

registerCoreCommandsFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected