mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-23 07:37:24 +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) {
|
function editHeightmap(options) {
|
||||||
const {mode, tool} = options || {};
|
const {mode, tool} = options || {};
|
||||||
restartHistory();
|
restartHistory();
|
||||||
|
viewbox.selectAll("#heights").remove();
|
||||||
viewbox.insert("g", "#terrs").attr("id", "heights");
|
viewbox.insert("g", "#terrs").attr("id", "heights");
|
||||||
|
|
||||||
if (!mode) showModeDialog();
|
if (!mode) showModeDialog();
|
||||||
|
|
@ -188,7 +189,7 @@ function editHeightmap(options) {
|
||||||
|
|
||||||
// restore initial layers
|
// restore initial layers
|
||||||
drawFeatures();
|
drawFeatures();
|
||||||
byId("heights").remove();
|
viewbox.selectAll("#heights").remove();
|
||||||
turnButtonOff("toggleHeight");
|
turnButtonOff("toggleHeight");
|
||||||
document
|
document
|
||||||
.getElementById("mapLayers")
|
.getElementById("mapLayers")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue