index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/modules/scenario.js')
-rw-r--r-- | src/modules/scenario.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/scenario.js b/src/modules/scenario.js index 805d0fe..4f72168 100644 --- a/src/modules/scenario.js +++ b/src/modules/scenario.js @@ -97,7 +97,8 @@ export async function build(svg, request) { const scenarioBuildings = scenario.querySelector('.gameboard .buildings'); if (scenarioGrid) { - grid.replaceWith(svg.ownerDocument.importNode(scenarioGrid, true)); + const frontmost = grid.querySelector('.frontmost'); + [...scenarioGrid.children].forEach(child => frontmost.before(svg.ownerDocument.importNode(child, true))); } if (scenarioBuildings) |