Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 25, 2017

Conversation

nreese
Copy link
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
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
Contributor

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
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
Contributor

@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
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
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