Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 0e4044f

Browse files
Merge pull request SORMAS-Foundation#3710 from hzi-braunschweig/3406_fix-dasboard-map
SORMAS-Foundation#3406 refresh map data after expand/minimize epi curve chart
2 parents e5e70e5 + cba35b1 commit 0e4044f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/contacts/ContactsDashboardView.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ protected VerticalLayout createEpiCurveLayout() {
369369
rowsLayout.setSizeFull();
370370
} else {
371371
rowsLayout.addComponent(statisticsComponent, 0);
372-
mapLayout.ifPresent(l -> epiCurveAndMapLayout.addComponent(l, 1));
372+
mapLayout.ifPresent(l -> {
373+
epiCurveAndMapLayout.addComponent(l, 1);
374+
mapComponent.refreshMap();
375+
});
373376
epiCurveLayout.setHeight(ROW_HEIGHT, Unit.PIXELS);
374377
ContactsDashboardView.this.setHeightUndefined();
375378
epiCurveAndMapLayout.setHeightUndefined();
@@ -452,6 +455,9 @@ protected Optional<VerticalLayout> createNetworkDiagramLayout() {
452455
}
453456
caseStatisticsLayout.setVisible(!expanded);
454457
epiCurveAndMapLayout.setVisible(!expanded);
458+
if (!expanded) {
459+
mapLayout.ifPresent(l -> mapComponent.refreshMap());
460+
}
455461
contactsStatisticsLayout.setVisible(!expanded);
456462
});
457463
return layout;

sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/surveillance/SurveillanceDiseaseCarouselLayout.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ private HorizontalLayout createEpiCurveAndMapLayout() {
133133
} else {
134134
addComponent(statisticsComponent, 1);
135135
epiCurveAndMapLayout.addComponent(mapComponent, 1);
136+
mapComponent.refreshMap();
136137
epiCurveAndMapLayout.setHeight(BASE_HEIGHT, Unit.PIXELS);
137138
setHeightUndefined();
138139
}

0 commit comments

Comments
 (0)