DieselDepot-APP/node_modules/recharts/lib/state/selectors/selectPlotArea.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

20 lines
No EOL
775 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.selectPlotArea = void 0;
var _reselect = require("reselect");
var _selectChartOffset = require("./selectChartOffset");
var _containerSelectors = require("./containerSelectors");
var selectPlotArea = exports.selectPlotArea = (0, _reselect.createSelector)([_selectChartOffset.selectChartOffset, _containerSelectors.selectChartWidth, _containerSelectors.selectChartHeight], (offset, chartWidth, chartHeight) => {
if (!offset || chartWidth == null || chartHeight == null) {
return undefined;
}
return {
x: offset.left,
y: offset.top,
width: Math.max(0, chartWidth - offset.left - offset.right),
height: Math.max(0, chartHeight - offset.top - offset.bottom)
};
});