Skip to content

Map filter not set appropriately when spy panel is open#13678

Merged
nreese merged 2 commits intoelastic:masterfrom
nreese:open_spy
Aug 25, 2017
Merged

Map filter not set appropriately when spy panel is open#13678
nreese merged 2 commits intoelastic:masterfrom
nreese:open_spy

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Aug 23, 2017

Fixes #13625

When a map visualization is added to a dashboard with the spy panel open, the leaflet map element has not height because the spy panel fills the entire panel. This causes problems because getUntrimmedBounds returned undefined. Instead of returning undefined, getUntrimmedBounds can calculate the map dimensions based on the parent element dimensions.

Fixing this issue revealed a new issue. Kibana_map does not call resize when the spy panel is opened/closed. This new issue should be resolved in a separate PR since its solution could effect other visualizations.

@nreese nreese added :Sharing Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:fix labels Aug 23, 2017
Copy link
Copy Markdown
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works good.

@ppisljar and I discussed the other resize issue (collapsing doesn't trigger resize). The issue seems to be we're listening on the node containing the entire -tree, not just the container-node of the actual visualization. Resolving this may also alleviate the need to traverse up the element list.

This approach here is a pretty good heuristic though to get a meaningful width/height when the container has 0/0 dimensions. It will get a reasonable value, rather than using some fixed dimension.

@stacey-gammon
Copy link
Copy Markdown

Kibana_map does not call resize when the spy panel is opened/closed.

Does this issue also prevent the circles from showing up? Or are you referring to only the whitespace (e.g. this issue - #13137)?

nomapdata

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Aug 25, 2017

@stacey-gammon It is effecting both. Leaflet is created in an element with 0 height so it does not display the markers. Simply calling invalidateSize() will fix everything but the visualization needs to know that the spy panel closed to trigger the call.

Copy link
Copy Markdown

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file an issue for the new problems revealed just so we can keep track? Unless there already is one.

otherwise, lgtm.

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Aug 25, 2017

@stacey-gammon new issue created - #13705

@nreese nreese merged commit 6115d85 into elastic:master Aug 25, 2017
nreese added a commit to nreese/kibana that referenced this pull request Aug 25, 2017
* get dimensions from parent elements when map has not height or width

* clean up test variable names
nreese added a commit to nreese/kibana that referenced this pull request Aug 25, 2017
* get dimensions from parent elements when map has not height or width

* clean up test variable names
nreese added a commit that referenced this pull request Aug 25, 2017
)

* get dimensions from parent elements when map has not height or width

* clean up test variable names
nreese added a commit that referenced this pull request Aug 25, 2017
)

* get dimensions from parent elements when map has not height or width

* clean up test variable names
@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Aug 25, 2017

backported to 6.0 #13706
backported to 6.1 #13707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:fix v6.0.0-rc1 v6.0.0 v6.1.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Map filter not set appropriately when spy panel is open

4 participants