diff --git a/src/actions/package.json b/src/actions/package.json index 6bce3bb60c..e002e48e7e 100644 --- a/src/actions/package.json +++ b/src/actions/package.json @@ -30,6 +30,7 @@ "umd" ], "dependencies": { + "@deck.gl/core": "^8.6.0", "@kepler.gl/cloud-providers": "3.0.0-alpha.0", "@kepler.gl/constants": "3.0.0-alpha.0", "@kepler.gl/layers": "3.0.0-alpha.0", diff --git a/src/actions/src/action-types.ts b/src/actions/src/action-types.ts index e31ea26af0..5f87435f0f 100644 --- a/src/actions/src/action-types.ts +++ b/src/actions/src/action-types.ts @@ -50,7 +50,7 @@ export const ACTION_PREFIX = '@@kepler.gl/'; * * export default createStore(reducers, {}, applyMiddleware(taskMiddleware)) */ -const ActionTypes = { +export const ActionTypes = { // identity action REGISTER_ENTRY: `${ACTION_PREFIX}REGISTER_ENTRY`, DELETE_ENTRY: `${ACTION_PREFIX}DELETE_ENTRY`, diff --git a/src/actions/src/vis-state-actions.ts b/src/actions/src/vis-state-actions.ts index 2f9998408c..ac3f216e36 100644 --- a/src/actions/src/vis-state-actions.ts +++ b/src/actions/src/vis-state-actions.ts @@ -19,6 +19,7 @@ // THE SOFTWARE. // vis-state-reducer +import {PickInfo} from '@deck.gl/core/lib/deck'; import {default as ActionTypes} from './action-types'; import {FileCacheItem} from '@kepler.gl/processors'; import {Layer, LayerBaseConfig} from '@kepler.gl/layers'; @@ -874,7 +875,7 @@ export function toggleFilterFeature( } export type OnLayerHoverUpdaterAction = { - info: {picked?: boolean} | null; + info: PickInfo | null; }; /** * Trigger layer hover event with hovered object @@ -884,7 +885,7 @@ export type OnLayerHoverUpdaterAction = { * @public */ export function onLayerHover( - info: {picked?: boolean} | null + info: PickInfo | null ): Merge { return { type: ActionTypes.LAYER_HOVER, @@ -893,7 +894,7 @@ export function onLayerHover( } export type OnLayerClickUpdaterAction = { - info: {picked?: boolean} | null; + info: PickInfo | null; }; /** * Trigger layer click event with clicked object @@ -903,7 +904,7 @@ export type OnLayerClickUpdaterAction = { * @public */ export function onLayerClick( - info: {picked?: boolean} | null + info: PickInfo | null ): Merge { return { type: ActionTypes.LAYER_CLICK, diff --git a/src/components/src/map-container.tsx b/src/components/src/map-container.tsx index 4695605326..5bf96373c2 100644 --- a/src/components/src/map-container.tsx +++ b/src/components/src/map-container.tsx @@ -22,6 +22,7 @@ import React, {Component, createRef, useMemo} from 'react'; import styled, {withTheme} from 'styled-components'; import {StaticMap, MapRef} from 'react-map-gl'; +import {PickInfo} from '@deck.gl/core/lib/deck'; import DeckGL from '@deck.gl/react'; import {createSelector, Selector} from 'reselect'; import mapboxgl from 'mapbox-gl'; @@ -412,12 +413,7 @@ export default function MapContainerFactory( this.props.visStateActions.onLayerClick(null); }; - _onLayerHover = ( - idx: number, - info: { - picked?: boolean; - } | null - ) => { + _onLayerHover = (idx: number, info: PickInfo | null) => { this.props.visStateActions.onLayerHover(info); };