|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.removeRadiusAxis = exports.removeAngleAxis = exports.polarAxisReducer = exports.addRadiusAxis = exports.addAngleAxis = void 0;
|
|---|
| 7 | var _toolkit = require("@reduxjs/toolkit");
|
|---|
| 8 | var _immer = require("immer");
|
|---|
| 9 | var initialState = {
|
|---|
| 10 | radiusAxis: {},
|
|---|
| 11 | angleAxis: {}
|
|---|
| 12 | };
|
|---|
| 13 | var polarAxisSlice = (0, _toolkit.createSlice)({
|
|---|
| 14 | name: 'polarAxis',
|
|---|
| 15 | initialState,
|
|---|
| 16 | reducers: {
|
|---|
| 17 | addRadiusAxis(state, action) {
|
|---|
| 18 | state.radiusAxis[action.payload.id] = (0, _immer.castDraft)(action.payload);
|
|---|
| 19 | },
|
|---|
| 20 | removeRadiusAxis(state, action) {
|
|---|
| 21 | delete state.radiusAxis[action.payload.id];
|
|---|
| 22 | },
|
|---|
| 23 | addAngleAxis(state, action) {
|
|---|
| 24 | state.angleAxis[action.payload.id] = (0, _immer.castDraft)(action.payload);
|
|---|
| 25 | },
|
|---|
| 26 | removeAngleAxis(state, action) {
|
|---|
| 27 | delete state.angleAxis[action.payload.id];
|
|---|
| 28 | }
|
|---|
| 29 | }
|
|---|
| 30 | });
|
|---|
| 31 | var {
|
|---|
| 32 | addRadiusAxis,
|
|---|
| 33 | removeRadiusAxis,
|
|---|
| 34 | addAngleAxis,
|
|---|
| 35 | removeAngleAxis
|
|---|
| 36 | } = polarAxisSlice.actions;
|
|---|
| 37 | exports.removeAngleAxis = removeAngleAxis;
|
|---|
| 38 | exports.addAngleAxis = addAngleAxis;
|
|---|
| 39 | exports.removeRadiusAxis = removeRadiusAxis;
|
|---|
| 40 | exports.addRadiusAxis = addRadiusAxis;
|
|---|
| 41 | var polarAxisReducer = exports.polarAxisReducer = polarAxisSlice.reducer; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.