Skip to content

Commit

Permalink
#454 Fix: Header Layer Descriptions Don't Save (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman authored Nov 30, 2023
1 parent 8bd22d0 commit 599a11c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,7 @@ function save(returnJSON) {
var modalDescription = layerEditors["LayerDescription" + modalId]
? layerEditors["LayerDescription" + modalId].getValue() || ""
: "";

var modalTags = modal.find("#tagsEl input").val();
var modalLegend = modal.find("#legendEl input").val();
var modalTileFormat = modal
Expand Down Expand Up @@ -2373,6 +2374,9 @@ function save(returnJSON) {
if (layerObject.uuid === "" || layerObject.uuid === "undefined")
layerObject.uuid = null;

if (modalDescription != "undefined")
layerObject.description = modalDescription;

if (
modalType == "vectortile" ||
modalType == "vector" ||
Expand All @@ -2395,8 +2399,6 @@ function save(returnJSON) {
layerObject.controlled = modalControlledEl;
if (modalType == "vector" && modalLayer3d != "undefined")
layerObject.layer3dType = modalLayer3d;
if (modalDescription != "undefined")
layerObject.description = modalDescription;
if (modalTags != "undefined" && modalTags != "")
layerObject.tags = modalTags
.replace(/ /g, "")
Expand Down

0 comments on commit 599a11c

Please sign in to comment.