Allow generic maps to be still generated
This commit is contained in:
@@ -15,11 +15,7 @@ async function loadScript(scenario, svg, script) {
|
||||
};
|
||||
|
||||
const dataset = scenario.querySelector('script')?.dataset || {};
|
||||
|
||||
if ('cols' in dataset && 'rows' in dataset) {
|
||||
scriptEl.dataset.rows = dataset.rows;
|
||||
scriptEl.dataset.cols = dataset.cols;
|
||||
}
|
||||
Object.entries(dataset).forEach(([k, v]) => scriptEl.dataset[k] = v);
|
||||
|
||||
scriptEl.setAttributeNS(null, 'href', `../../${script}.js`);
|
||||
svg.append(scriptEl);
|
||||
|
||||
Reference in New Issue
Block a user