Skip to content

Commit

Permalink
saving in uistate is sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Jul 18, 2017
1 parent 274b084 commit e068fd3
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/core_plugins/region_map/public/region_map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,6 @@ module.controller('KbnRegionMapController', function ($scope, $element, Private,
kibanaMap.addLegendControl();
kibanaMap.addFitControl();
kibanaMap.persistUiStateForVisualization($scope.vis);


const saveCurrentLocation = () => {
//to ensure we dirty the state of the viz. (not sure why this is required. Tilemap visualization does not require it)
$scope.vis.params.mapZoom = kibanaMap.getZoomLevel();
$scope.vis.params.mapCenter = kibanaMap.getCenter();
$scope.$apply();
};

kibanaMap.on('dragend', saveCurrentLocation);
kibanaMap.on('zoomend', saveCurrentLocation);

}

function setTooltipFormatter() {
Expand Down

0 comments on commit e068fd3

Please sign in to comment.