Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

COR-749 Fix responsive Choropleth sizing #4293

Merged
merged 5 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export type CanvasChoroplethMapProps = {
fitExtent: FitExtent;
getFeatureName: (code: string) => string;
height: number;
useMinHeight?: boolean;
VWSCoronaDashboard24 marked this conversation as resolved.
Show resolved Hide resolved
isTabInteractive: boolean;
mapProjection: () => GeoProjection;
tooltipTrigger: ChoroplethTooltipHandlers[2];
Expand All @@ -72,6 +73,7 @@ export const CanvasChoroplethMap = (props: CanvasChoroplethMapProps) => {
fitExtent,
getFeatureName,
height,
useMinHeight = false,
isTabInteractive,
mapProjection,
tooltipTrigger,
Expand Down Expand Up @@ -170,7 +172,7 @@ export const CanvasChoroplethMap = (props: CanvasChoroplethMapProps) => {
<div
ref={containerRef}
style={{
minHeight: height,
minHeight: useMinHeight ? height : 'inherit',
maxHeight: '75vh',
maxWidth: '100%',
height: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export const ChoroplethMap: <T extends ChoroplethDataItem>(
dataOptions={dataOptions}
width={width}
height={correctedHeight}
useMinHeight={minHeight > 0}
VWSCoronaDashboard24 marked this conversation as resolved.
Show resolved Hide resolved
annotations={annotations}
featureOverHandler={featureOverHandler}
featureOutHandler={featureOutHandler}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/gemeente/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const Municipality = (props: StaticProps<typeof getStaticProps>) => {
}}
map="gm"
data={data}
minHeight={900}
minHeight={0}
dataConfig={{
metricName: 'gemeente' as any,
metricProperty: 'admissions_on_date_of_admission',
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/veiligheidsregio/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const VrIndexPage = (props: StaticProps<typeof getStaticProps>) => {
}}
map="vr"
data={data}
minHeight={900}
minHeight={0}
dataConfig={{
metricName: 'veiligheidsregio' as any,
metricProperty: 'admissions_on_date_of_admission',
Expand Down