Apply URL parameters before the preset so the requested spacing takes effect
1 changed file+3−2
src/main.tsmodified+3−2View file
@@ -145,10 +145,11 @@ class App {
145145
146146 if (url.has("mode")) this.setRunMode(url.get("mode") === "full" ? "full" : "linear");
147147 else this.setRunMode(this.device ? "linear" : "linear");
148- const preset = url.get("preset");
149- this.editor.selectPreset(preset && presetById(preset) ? preset : DEFAULT_PRESET);
148+ // The parameters come first, so that the preset is evaluated at the requested spacing.
150149 this.form.applyUrl(url);
151150 this.durationInput.value = String(this.form.get().duration);
151+ const preset = url.get("preset");
152+ this.editor.selectPreset(preset && presetById(preset) ? preset : DEFAULT_PRESET);
152153
153154 const loop = () => {
154155 this.renderer.render();