diff --git a/browser/modules/layerTree/index.js b/browser/modules/layerTree/index.js index 1bb0dad60..a510e3294 100644 --- a/browser/modules/layerTree/index.js +++ b/browser/modules/layerTree/index.js @@ -2002,7 +2002,9 @@ module.exports = { `).openOn(cloud.get().map) .on('remove', () => { sqlQuery.resetAll(); - _self.resetAllVectorLayerStyles(); + if (window.vidiConfig.crossMultiSelect) { + _self.resetAllVectorLayerStyles(); + } }); } } diff --git a/public/js/gc2/gc2table.js b/public/js/gc2/gc2table.js index 7a1abfa8e..8f3d4663d 100644 --- a/public/js/gc2/gc2table.js +++ b/public/js/gc2/gc2table.js @@ -256,6 +256,7 @@ var gc2table = (function () { var bindEvent = function (e) { setTimeout(function () { $(el + ' > tbody > tr').on("click", function (e) { + m.map.closePopup(); var id = $(this).data('uniqueid'); var databaseIdentifier = getDatabaseIdForLayerId(id); if (uncheckedIds.indexOf(databaseIdentifier) === -1 || checkBox === false) { @@ -422,14 +423,18 @@ var gc2table = (function () { data = []; $.each(store.layer._layers, function (i, v) { v.feature.properties._id = i; - $.each(v.feature.properties, function (n, m) { + + // Clone + let layerClone = jQuery.extend(true, {}, v.feature.properties); + $.each(layerClone, function (n, m) { $.each(cm, function (j, k) { if (k.dataIndex === n && ((typeof k.link === "boolean" && k.link === true) || (typeof k.link === "string"))) { - v.feature.properties[n] = "" + (typeof k.link === "string" ? k.link : "Link") + ""; + layerClone[n] = "" + (typeof k.link === "string" ? k.link : "Link") + ""; } }); }); - data.push(JSON.parse(JSON.stringify(v.feature.properties))); + data.push(JSON.parse(JSON.stringify(layerClone))); + layerClone = null; if (assignFeatureEventListenersOnDataLoad) { assignEventListeners();