Skip to content

Commit

Permalink
geosolutions-it#9697: fix spatial filter and widget connection issues
Browse files Browse the repository at this point in the history
Description:
- Resolve review comments
  • Loading branch information
mahmoudadel54 committed Dec 13, 2023
1 parent d5ec524 commit 1ab004d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion web/client/epics/widgetsbuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const initEditorOnNewChart = (action$, {getState = () => {}} = {}) => act
charts: [
{
chartId,
layer,
legend: false,
cartesian: true,
traces: [
Expand Down
2 changes: 1 addition & 1 deletion web/client/reducers/__tests__/widgets-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ describe('Test the widgets reducer', () => {
expect(widgetObjects[1].layer).toEqual(newTargetLayer);
expect(widgetObjects[2].layer).toEqual(state.containers[DEFAULT_TARGET].widgets[2].layer);
expect(widgetObjects[3].layer).toEqual(newTargetLayer);
expect(widgetObjects[4].charts[0].layer).toEqual(newTargetLayer);
expect(widgetObjects[4].charts[0].layer.id).toEqual(newTargetLayer.id);
expect(widgetObjects[4].charts[1].layer).toEqual(state.containers[DEFAULT_TARGET].widgets[4].charts[1].layer);
expect(widgetObjects[4].charts[2].layer).toEqual(state.containers[DEFAULT_TARGET].widgets[4].charts[1].layer);
expect(widgetObjects[4].charts[2].traces[0].layer).toEqual(state.containers[DEFAULT_TARGET].widgets[4].charts[2].traces[0].layer);
Expand Down
1 change: 0 additions & 1 deletion web/client/reducers/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ function widgetsReducer(state = emptyState, action) {
let chartsCopy = w?.charts?.length ? [...w.charts] : [];
chartsCopy = chartsCopy.map(chart=>{
let chartItem = {...chart};
chartItem = get(chart, "layer.id") === action.layer.id ? set("layer", action.layer, chart) : chart;
chartItem.traces = chartItem?.traces?.map(trace=>
get(trace, "layer.id") === action.layer.id ? set("layer", action.layer, trace) : trace
);
Expand Down

0 comments on commit 1ab004d

Please sign in to comment.