fix: boolean settings

This commit is contained in:
Felix Roos 2023-12-17 21:28:25 +01:00
parent 1cdb5964c6
commit b462f19ef1
3 changed files with 10 additions and 6 deletions

View file

@ -21,7 +21,7 @@
<strudel-editor code={`s("bd")`}></strudel-editor>
<p>This is another REPL:</p>
<strudel-editor is-line-numbers-displayed="0"><!--
<strudel-editor><!--
n(run(4).sub(4))
.chord("<C^7#11 E^7#11>/16")
.dict('ireal')

View file

@ -1,5 +1,5 @@
import { hash2code, logger } from '@strudel.cycles/core';
import { codemirrorSettings } from '@strudel/codemirror';
import { codemirrorSettings, defaultSettings } from '@strudel/codemirror';
import './vanilla.css';
let editor;
@ -112,6 +112,6 @@ function setFormValues(form, values) {
const form = document.querySelector('form[name=settings]');
setFormValues(form, codemirrorSettings.get());
form.addEventListener('change', () => {
const values = getFormValues(form, codemirrorSettings.get());
const values = getFormValues(form, defaultSettings);
editor?.updateSettings(values);
});