|
Last change
on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
960 bytes
|
| Line | |
|---|
| 1 | import { createSelector } from 'reselect';
|
|---|
| 2 | import { selectTooltipState } from './selectTooltipState';
|
|---|
| 3 | var selectAllTooltipPayloadConfiguration = createSelector([selectTooltipState], tooltipState => tooltipState.tooltipItemPayloads);
|
|---|
| 4 | export var selectTooltipCoordinate = createSelector([selectAllTooltipPayloadConfiguration, (_state, tooltipIndex) => tooltipIndex, (_state, _tooltipIndex, graphicalItemId) => graphicalItemId], (allTooltipConfigurations, tooltipIndex, graphicalItemId) => {
|
|---|
| 5 | if (tooltipIndex == null) {
|
|---|
| 6 | return undefined;
|
|---|
| 7 | }
|
|---|
| 8 | var mostRelevantTooltipConfiguration = allTooltipConfigurations.find(tooltipConfiguration => {
|
|---|
| 9 | return tooltipConfiguration.settings.graphicalItemId === graphicalItemId;
|
|---|
| 10 | });
|
|---|
| 11 | if (mostRelevantTooltipConfiguration == null) {
|
|---|
| 12 | return undefined;
|
|---|
| 13 | }
|
|---|
| 14 | var {
|
|---|
| 15 | getPosition
|
|---|
| 16 | } = mostRelevantTooltipConfiguration;
|
|---|
| 17 | if (getPosition == null) {
|
|---|
| 18 | return undefined;
|
|---|
| 19 | }
|
|---|
| 20 | return getPosition(tooltipIndex);
|
|---|
| 21 | }); |
|---|
Note:
See
TracBrowser
for help on using the repository browser.