mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-22 15:17:23 +01:00
Fix: Ensure heightmap elements are properly removed before re-insertion in editHeightmap function
This commit is contained in:
parent
a276b61b2d
commit
439caced87
1 changed files with 3 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
function editHeightmap(options) {
|
||||
const {mode, tool} = options || {};
|
||||
restartHistory();
|
||||
viewbox.selectAll("#heights").remove();
|
||||
viewbox.insert("g", "#terrs").attr("id", "heights");
|
||||
|
||||
if (!mode) showModeDialog();
|
||||
|
|
@ -188,7 +189,8 @@ function editHeightmap(options) {
|
|||
|
||||
// restore initial layers
|
||||
drawFeatures();
|
||||
byId("heights").remove();
|
||||
viewbox.selectAll("#heights").remove();
|
||||
|
||||
turnButtonOff("toggleHeight");
|
||||
document
|
||||
.getElementById("mapLayers")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue