Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visibility limits - The resolution option is not retained as Limits type #10391 #10598

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/client/components/TOC/fragments/settings/Display.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export default class extends React.Component {
projection={this.props.projection}
resolutions={this.props.resolutions}
zoom={this.props.zoom}
defaultLimitsType={this.props.element.visibilityLimitType}
/>
</FormGroup>
</Col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ function VisibilityLimitsForm({
disabled={disableResolutionLimits || loading}
onChange={({ value }) => {
setLimitsType(value);
onChange({
visibilityLimitType: value
});
clearMessages();
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ export const saveLayer = (layer) => {
legendOptions: layer.legendOptions,
tileSize: layer.tileSize,
version: layer.version,
expanded: layer.expanded || false
expanded: layer.expanded || false,
...(layer.visibilityLimitType ? { ...layer.visibilityLimitType, ...layer.visibilityLimitType } : {})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an object to spread?
I think it is ok to make it undefined.

},
layer?.enableInteractiveLegend !== undefined ? { enableInteractiveLegend: layer?.enableInteractiveLegend } : {},
layer.sources ? { sources: layer.sources } : {},
Expand Down
Loading