File size: 575 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { createSelector } from 'reselect';
import { selectChartOffsetInternal } from './selectChartOffsetInternal';
import { ChartOffsetInternal } from '../../util/types';
import { ChartOffset } from '../../types';

export const selectChartOffset = createSelector(
  [selectChartOffsetInternal],
  (offsetInternal: ChartOffsetInternal): ChartOffset => {
    if (!offsetInternal) {
      return undefined;
    }
    return {
      top: offsetInternal.top,
      bottom: offsetInternal.bottom,
      left: offsetInternal.left,
      right: offsetInternal.right,
    };
  },
);