DieselDepot-APP/node_modules/recharts/es6/state/selectors/brushSelectors.js
SJCoetz def597c157 chore: add generated build artifacts and node module type files
add all Next.js build outputs and third-party dependency type declaration files
2026-07-20 01:18:42 +02:00

11 lines
No EOL
774 B
JavaScript

import { createSelector } from 'reselect';
import { selectChartOffsetInternal } from './selectChartOffsetInternal';
import { selectMargin } from './containerSelectors';
import { isNumber } from '../../util/DataUtils';
export var selectBrushSettings = state => state.brush;
export var selectBrushDimensions = createSelector([selectBrushSettings, selectChartOffsetInternal, selectMargin], (brushSettings, offset, margin) => ({
height: brushSettings.height,
x: isNumber(brushSettings.x) ? brushSettings.x : offset.left,
y: isNumber(brushSettings.y) ? brushSettings.y : offset.top + offset.height + offset.brushBottom - ((margin === null || margin === void 0 ? void 0 : margin.bottom) || 0),
width: isNumber(brushSettings.width) ? brushSettings.width : offset.width
}));