restring layers off on heightmap edit

This commit is contained in:
Azgaar 2021-04-18 22:03:57 +03:00
parent 6f08c87015
commit 886ea38b44
2 changed files with 6 additions and 2 deletions

View file

@ -120,13 +120,17 @@ function restoreLayers() {
}
function toggleHeight(event) {
if (customization === 1) {
tip("You cannot turn off the layer when heightmap is in edit mode", false, "error");
return;
}
if (!terrs.selectAll("*").size()) {
turnButtonOn("toggleHeight");
drawHeightmap();
if (event && isCtrlClick(event)) editStyle("terrs");
} else {
if (event && isCtrlClick(event)) {editStyle("terrs"); return;}
if (customization === 1) {tip("You cannot turn off the layer when heightmap is in edit mode", false, "error"); return;}
turnButtonOff("toggleHeight");
terrs.selectAll("*").remove();
}