mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-27 01:22:49 +00:00
25 lines
704 B
JavaScript
25 lines
704 B
JavaScript
import { createSlice } from '@reduxjs/toolkit';
|
|
var initialState = null;
|
|
var reducers = {
|
|
updatePolarOptions: (state, action) => {
|
|
if (state === null) {
|
|
return action.payload;
|
|
}
|
|
state.startAngle = action.payload.startAngle;
|
|
state.endAngle = action.payload.endAngle;
|
|
state.cx = action.payload.cx;
|
|
state.cy = action.payload.cy;
|
|
state.innerRadius = action.payload.innerRadius;
|
|
state.outerRadius = action.payload.outerRadius;
|
|
return state;
|
|
}
|
|
};
|
|
var polarOptionsSlice = createSlice({
|
|
name: 'polarOptions',
|
|
initialState,
|
|
reducers
|
|
});
|
|
export var {
|
|
updatePolarOptions
|
|
} = polarOptionsSlice.actions;
|
|
export var polarOptionsReducer = polarOptionsSlice.reducer; |