mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[8.10] [maps] fix 'by value' map does not fill dashboard panel on initial page load in 8.10 (#165326) (#165369)
# Backport This will backport the following commits from `main` to `8.10`: - [[maps] fix 'by value' map does not fill dashboard panel on initial page load in 8.10 (#165326)](https://github.com/elastic/kibana/pull/165326) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2023-08-31T16:33:56Z","message":"[maps] fix 'by value' map does not fill dashboard panel on initial page load in 8.10 (#165326)\n\nFixes https://github.com/elastic/kibana/issues/165183\r\n\r\n### Test instructions\r\n1) install any sample data set\r\n2) open new dashboard\r\n3) Use \"Add panel\" buttons to add by-value map with only base map layer\r\n4) Ensure map tiles fill entire map panel in dashboard\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"168412ba7b61bde4ed810ef34e2e951d4e68d0fc","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","v8.10.0","v8.11.0"],"number":165326,"url":"https://github.com/elastic/kibana/pull/165326","mergeCommit":{"message":"[maps] fix 'by value' map does not fill dashboard panel on initial page load in 8.10 (#165326)\n\nFixes https://github.com/elastic/kibana/issues/165183\r\n\r\n### Test instructions\r\n1) install any sample data set\r\n2) open new dashboard\r\n3) Use \"Add panel\" buttons to add by-value map with only base map layer\r\n4) Ensure map tiles fill entire map panel in dashboard\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"168412ba7b61bde4ed810ef34e2e951d4e68d0fc"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/165326","number":165326,"mergeCommit":{"message":"[maps] fix 'by value' map does not fill dashboard panel on initial page load in 8.10 (#165326)\n\nFixes https://github.com/elastic/kibana/issues/165183\r\n\r\n### Test instructions\r\n1) install any sample data set\r\n2) open new dashboard\r\n3) Use \"Add panel\" buttons to add by-value map with only base map layer\r\n4) Ensure map tiles fill entire map panel in dashboard\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>","sha":"168412ba7b61bde4ed810ef34e2e951d4e68d0fc"}}]}] BACKPORT--> Co-authored-by: Nathan Reese <reese.nathan@elastic.co>
This commit is contained in:
parent
5c50d2b681
commit
a2924642b5
1 changed files with 6 additions and 1 deletions
|
@ -191,8 +191,13 @@ export class MbMap extends Component<Props, State> {
|
|||
}
|
||||
});
|
||||
mbMap.on('load', () => {
|
||||
emptyImage = new Image();
|
||||
// Map instance automatically resizes when container size changes.
|
||||
// However, issues may arise if container resizes before map finishes loading.
|
||||
// This is occuring when by-value maps are used in dashboard.
|
||||
// To prevent issues, resize container after load
|
||||
mbMap.resize();
|
||||
|
||||
emptyImage = new Image();
|
||||
emptyImage.src =
|
||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=';
|
||||
emptyImage.crossOrigin = 'anonymous';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue