mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-22 15:17:23 +01:00
Fix duplicate heightmap overlay cleanup on editor enter and exit
Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com>
This commit is contained in:
parent
b218240564
commit
edcde496cf
1 changed files with 2 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,7 @@ 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