dr-sandbox/app/web/static/compare.js
Michael Pilosov 4ecdc7f586 modal: hide axes dropdown for single-panel runs
Disable #cc-sync in panel-grid when there's only one stem (nothing to
sync; aspect is fixed by the dialog) and hide any .compare-controls
label whose select is disabled via :has.
2026-04-22 17:23:51 -06:00

16 lines
532 B
JavaScript

// compare.js — thin shim that parses ?stem=…&stem=… (legacy ?a=&b=) and
// hands off to panel-grid.js.
import { mountPanels } from './panel-grid.js?v=6';
const params = new URLSearchParams(window.location.search);
let stems = params.getAll('stem').filter(Boolean);
if (stems.length === 0) {
stems = [params.get('a') || '', params.get('b') || ''].filter(Boolean);
}
const host = document.getElementById('panel-host');
const controls = document.getElementById('compare-controls');
mountPanels({ host, controls, stems });