mirror of
https://github.com/grafana/grafana.git
synced 2025-09-24 17:53:53 +08:00
Resize map on changing browser size (#47084)
This commit is contained in:
@ -120,6 +120,12 @@ export class GeomapPanel extends Component<Props, State> {
|
|||||||
return true; // always?
|
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 */
|
/** This function will actually update the JSON model */
|
||||||
private doOptionsUpdate(selected: number) {
|
private doOptionsUpdate(selected: number) {
|
||||||
const { options, onOptionsChange } = this.props;
|
const { options, onOptionsChange } = this.props;
|
||||||
|
Reference in New Issue
Block a user