Skip to content

Commit

Permalink
Fix #9666 Include pointCloudShading option to saved layer config (#9670)
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap authored Oct 27, 2023
1 parent b94b6e3 commit ceb5f4d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 } : {});
};

/**
Expand Down
14 changes: 14 additions & 0 deletions web/client/utils/__tests__/LayersUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) );
Expand Down

0 comments on commit ceb5f4d

Please sign in to comment.