import { SettingsSpec } from '../../../../specs/settings' ; import { createCustomCachedSelector } from '../../../../state/create_selector' ; import { getSettingsSpecSelector } from '../../../../state/selectors/get_settings_specs' ; import { getOrientedXPosition , getOrientedYPosition } from '../../utils/interactions' ; import { getPanelSize } from '../../utils/panel' ; import { computeSmallMultipleScalesSelector , SmallMultipleScales } from './compute_small_multiple_scales' ; import { getProjectedPointerPositionSelector , PointerPosition } from './get_projected_pointer_position' ; internal export const getOrientedProjectedPointerPositionSelector = createCustomCachedSelector ( [ getProjectedPointerPositionSelector , getSettingsSpecSelector , computeSmallMultipleScalesSelector ] , getOrientedProjectedPointerPosition ) ; function getOrientedProjectedPointerPosition ( { x , y , horizontalPanelValue , verticalPanelValue } , settingsSpec , scales ) { const panel = getPanelSize ( scales ) ; return { x : getOrientedXPosition ( x , y , settingsSpec . rotation , panel ) , y : getOrientedYPosition ( x , y , settingsSpec . rotation , panel ) , horizontalPanelValue , verticalPanelValue , } ; }