Resize map on changing browser size (#47084)

pull/47088/head
Adela Almasan 4 years ago committed by GitHub
parent 85286a5182
commit dea9b51a0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      public/app/plugins/panel/geomap/GeomapPanel.tsx

@ -120,6 +120,12 @@ export class GeomapPanel extends Component<Props, State> {
return true; // always?
}
componentDidUpdate(prevProps: Props) {
if (this.map && (this.props.height !== prevProps.height || this.props.width !== prevProps.width)) {
this.map.updateSize();
}
}
/** This function will actually update the JSON model */
private doOptionsUpdate(selected: number) {
const { options, onOptionsChange } = this.props;

Loading…
Cancel
Save