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

fix map resize + small improvement suggestions #13230

Closed
wants to merge 2 commits into from

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Jul 31, 2017

Closes #12983.

This addresses actually a couple of things:

  • I think we are listening on the wrong element for the resize. We need to listen on the container that surrounds the chart, not the entire container that also includes the editor.
  • I also made some changes to how we compare sizes. The general-purpose evaluation with the stringification and the hashing is brute force. We know the shape of our objects and can do more efficient comparisons. So it addresses part of one of the line items in Visualize refactor follow up #12930 as well.
  • It fixes a small bug in the maps_visualization that the map would not resize if no data was present. This is somewhat theoretical, but it's a possibility.

@@ -22,8 +22,9 @@ function serializer() {
}

const getUpdateStatus = ($scope) => {
if (!$scope._oldStatus) $scope._oldStatus = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

_oldStatus should be string-map iso array i think

@thomasneirynck thomasneirynck added review v6.0.0 Feature:Visualizations Generic visualization features (in case no more specific feature label is available) labels Jul 31, 2017
if (status.resize) {
this._kibanaMap.resize();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reorder to ensure map always resizes, even if no data on map

@ppisljar
Copy link
Member

ppisljar commented Aug 1, 2017

@thomasneirynck i think the issue is actually much smaller. render method does trigger on collapse, however the indication if the size has changed or not was not implemented correctly.

take a look at #13239 where the bug is fixed with minimal changes.
that just addresses the actual bug and does nothing about the #12930

@thomasneirynck
Copy link
Contributor Author

closing this in favor of #13239, which is a m uch smaller fix

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) review v6.0.0-rc1 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map does not resize when side-bar is collapsed
3 participants