import { Selector } from 'react-redux' ; import { ChartType } from '../../..' ; import { getOnElementOverSelector } from '../../../../common/event_handler_selectors' ; import { LayerValue } from '../../../../specs' ; import { GlobalChartState } from '../../../../state/chart_state' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs' ; import { getSpecOrNull } from './goal_spec' ; import { getPickedShapesLayerValues } from './picked_shapes' ; internal export function createOnElementOverCaller ( ) { const prev = { pickedShapes : [ ] } ; let selector = null ; return ( state ) => { if ( selector === null && state . chartType === ChartType . Goal ) { selector = createCustomCachedSelector ( [ getSpecOrNull , getPickedShapesLayerValues , getSettingsSpecSelector ] , getOnElementOverSelector ( prev ) ) ; } if ( selector ) { selector ( state ) ; } } ; }