Clone template instead of modifying original
This commit is contained in:
@@ -70,9 +70,6 @@ export async function build(svg, request) {
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
console.log('refs', refs);
|
||||
console.log(counters.split('/').pop().split('-').shift());
|
||||
|
||||
const hashedFilenames = {
|
||||
'counters.svg': counters,
|
||||
'mapsheets.svg': mapsheets
|
||||
@@ -98,13 +95,6 @@ export async function build(svg, request) {
|
||||
});
|
||||
});
|
||||
|
||||
// scenario.querySelectorAll('use.mapsheet').forEach(el =>
|
||||
// gb.querySelector('#background').after(svg.ownerDocument.importNode(el, true))
|
||||
//);
|
||||
|
||||
// startLocs.querySelectorAll('.counter').forEach(el => console.log(el));
|
||||
//console.log(startLocs);
|
||||
|
||||
//if (startLocs) grid.before(svg.ownerDocument.importNode(startLocs, true));
|
||||
|
||||
const scenarioGrid = scenario.querySelector('.grid');
|
||||
@@ -113,8 +103,6 @@ export async function build(svg, request) {
|
||||
grid.replaceWith(svg.ownerDocument.importNode(scenarioGrid, true));
|
||||
}
|
||||
|
||||
//defs.replaceWith(scenario.querySelector('defs'));
|
||||
|
||||
await loadScript(scenario, svg, 'radial')
|
||||
return loadScript(scenario, svg, 'map');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user