From 40527746fcddad746a3ae8025d553eeca0473a7f Mon Sep 17 00:00:00 2001 From: Nathan Reese Date: Fri, 17 Jul 2020 13:48:38 -0600 Subject: [PATCH] fix tslint errors --- x-pack/plugins/maps/public/actions/map_actions.ts | 2 +- .../layers/blended_vector_layer/blended_vector_layer.ts | 4 ++++ .../public/classes/layers/vector_layer/vector_layer.d.ts | 1 + x-pack/plugins/maps/public/elasticsearch_geo_utils.d.ts | 9 +++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/maps/public/elasticsearch_geo_utils.d.ts diff --git a/x-pack/plugins/maps/public/actions/map_actions.ts b/x-pack/plugins/maps/public/actions/map_actions.ts index bb7cf7d6d303a..ef0cfdf0b4742 100644 --- a/x-pack/plugins/maps/public/actions/map_actions.ts +++ b/x-pack/plugins/maps/public/actions/map_actions.ts @@ -237,7 +237,7 @@ export function setQuery({ // setQuery can be triggered before async data fetching completes // Only continue execution path if setQuery has not been re-triggered. if (localSetQueryCallId === lastSetQueryCallId) { - dispatch(fitToDataBounds()); + dispatch(fitToDataBounds()); } } else { await dispatch(syncDataForAllLayers()); diff --git a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts index aefa2beede7d1..c0b9c4553d01e 100644 --- a/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts +++ b/x-pack/plugins/maps/public/classes/layers/blended_vector_layer/blended_vector_layer.ts @@ -237,6 +237,10 @@ export class BlendedVectorLayer extends VectorLayer implements IVectorLayer { return []; } + hasJoins() { + return false; + } + getSource() { return this._isClustered ? this._clusterSource : this._documentSource; } diff --git a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.d.ts b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.d.ts index b8e6bbfc6d77a..e6cb212daddae 100644 --- a/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.d.ts +++ b/x-pack/plugins/maps/public/classes/layers/vector_layer/vector_layer.d.ts @@ -82,4 +82,5 @@ export class VectorLayer extends AbstractLayer implements IVectorLayer { getStyle(): IVectorStyle; getFeatureById(id: string | number): Feature | null; getPropertiesForTooltip(properties: GeoJsonProperties): Promise; + hasJoins(): boolean; } diff --git a/x-pack/plugins/maps/public/elasticsearch_geo_utils.d.ts b/x-pack/plugins/maps/public/elasticsearch_geo_utils.d.ts new file mode 100644 index 0000000000000..ad81b1980765d --- /dev/null +++ b/x-pack/plugins/maps/public/elasticsearch_geo_utils.d.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ + +import { MapExtent } from '../common/descriptor_types'; + +export function scaleBounds(bounds: MapExtent, scaleFactor: number): MapExtent;