From ceb5f4d175dccb8682ad1e3fff6931f11fc8e46d Mon Sep 17 00:00:00 2001 From: stefano bovio Date: Fri, 27 Oct 2023 16:45:04 +0200 Subject: [PATCH] Fix #9666 Include pointCloudShading option to saved layer config (#9670) --- web/client/utils/LayersUtils.js | 3 ++- web/client/utils/__tests__/LayersUtils-test.js | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/web/client/utils/LayersUtils.js b/web/client/utils/LayersUtils.js index 2ba6c2674d..4df8de47a8 100644 --- a/web/client/utils/LayersUtils.js +++ b/web/client/utils/LayersUtils.js @@ -657,7 +657,8 @@ export const saveLayer = (layer) => { layer.tileGridCacheSupport ? { tileGridCacheSupport: layer.tileGridCacheSupport } : {}, isString(layer.rowViewer) ? { rowViewer: layer.rowViewer } : {}, !isNil(layer.forceProxy) ? { forceProxy: layer.forceProxy } : {}, - !isNil(layer.disableFeaturesEditing) ? { disableFeaturesEditing: layer.disableFeaturesEditing } : {}); + !isNil(layer.disableFeaturesEditing) ? { disableFeaturesEditing: layer.disableFeaturesEditing } : {}, + layer.pointCloudShading ? { pointCloudShading: layer.pointCloudShading } : {}); }; /** diff --git a/web/client/utils/__tests__/LayersUtils-test.js b/web/client/utils/__tests__/LayersUtils-test.js index 7e628fc827..4354ed5394 100644 --- a/web/client/utils/__tests__/LayersUtils-test.js +++ b/web/client/utils/__tests__/LayersUtils-test.js @@ -1246,6 +1246,20 @@ describe('LayersUtils', () => { l => { expect(l.disableFeaturesEditing).toBeTruthy(); } + ], + [ + { + pointCloudShading: { + attenuation: true, + maximumAttenuation: 4, + eyeDomeLighting: true, + eyeDomeLightingStrength: 1, + eyeDomeLightingRadius: 1 + } + }, + l => { + expect(l.pointCloudShading).toBeTruthy(); + } ] ]; layers.map(([layer, test]) => test(LayersUtils.saveLayer(layer)) );