reports/frontend/node_modules/recharts/es6/state/brushSlice.js
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

34 lines
No EOL
757 B
JavaScript

import { createSlice } from '@reduxjs/toolkit';
/**
* From all Brush properties, only height has a default value and will always be defined.
* Other properties are nullable and will be computed from offsets and margins if they are not set.
*/
var initialState = {
x: 0,
y: 0,
width: 0,
height: 0,
padding: {
top: 0,
right: 0,
bottom: 0,
left: 0
}
};
export var brushSlice = createSlice({
name: 'brush',
initialState,
reducers: {
setBrushSettings(_state, action) {
if (action.payload == null) {
return initialState;
}
return action.payload;
}
}
});
var setBrushSettings = brushSlice.actions.setBrushSettings;
export { setBrushSettings };
export var brushReducer = brushSlice.reducer;