diff --git a/src/reducer/contextReducer.js b/src/reducer/contextReducer.js index 6928184..0f7d88e 100644 --- a/src/reducer/contextReducer.js +++ b/src/reducer/contextReducer.js @@ -1,15 +1,15 @@ import update from 'react-addons-update'; -import * as contextTools from 'src/js/constants/contextTools.js'; -import { COLOR_STRING_TO_HEX, COLOR_HEX_TO_STRING } from 'src/js/constants/general.js'; -import { ERASER_SIZES, BRUSH_SIZES } from 'src/js/constants/d2Constants.js'; -import * as actions from 'src/js/actions/index.js'; +import * as contextTools from '../constants/contextTools.js'; +import { COLOR_STRING_TO_HEX, COLOR_HEX_TO_STRING } from '../constants/general.js'; +import { ERASER_SIZES, BRUSH_SIZES } from '../constants/d2Constants.js'; +import * as actions from '../actions/index.js'; import { select } from './menusReducer.js'; -import { getSelectedObjectsSelector, getBoundingBox } from 'src/js/utils/selectionUtils.js'; +import { getSelectedObjectsSelector, getBoundingBox } from '../utils/selectionUtils.js'; import { Matrix } from 'cal'; export default function (state, action) { switch (action.category) { - case actions.sketcher.CAT_SELECTION: { + case actions.CAT_SELECTION: { let menus = state.menus; const [firstSelected] = state.selection.objects; @@ -30,7 +30,7 @@ export default function (state, action) { } switch (action.type) { - case actions.sketcher.D2_CHANGE_TOOL: { + case actions.D2_CHANGE_TOOL: { const color = COLOR_HEX_TO_STRING[state.context.color]; return update(state, { menus: { $set: select(state.menus, color) } diff --git a/src/reducer/d2/tools/bucketReducer.js b/src/reducer/d2/tools/bucketReducer.js index ebf155e..fe37944 100644 --- a/src/reducer/d2/tools/bucketReducer.js +++ b/src/reducer/d2/tools/bucketReducer.js @@ -5,7 +5,7 @@ import * as actions from '../../../actions/index.js'; import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js'; import { LINE_WIDTH, CLIPPER_PRECISION } from '../../../constants/d2Constants.js'; import { shapeToPoints, applyMatrixOnShape, pathToVectorPath } from '../../../shape/shapeDataUtils.js'; -import { addObject } from '../../../reducers/objectReducers.js'; +import { addObject } from '../../../reducer/objectReducers.js'; import subtractShapeFromState from '../../../utils/subtractShapeFromState.js'; import { getColor, getFirst, filterType, getObjectsFromIds } from '../../../utils/objectSelectors.js'; import createDebug from 'debug'; diff --git a/src/reducer/d2/tools/penReducer.js b/src/reducer/d2/tools/penReducer.js index 5d36c01..e20b6d0 100644 --- a/src/reducer/d2/tools/penReducer.js +++ b/src/reducer/d2/tools/penReducer.js @@ -1,7 +1,7 @@ import update from 'react-addons-update'; import * as actions from '../../../actions/index.js'; import createDebug from 'debug'; -import { removeObject, addObjectActive2D, setActive2D } from '../../../reducers/objectReducers.js'; +import { removeObject, addObjectActive2D, setActive2D } from '../../../reducer/objectReducers.js'; import { SNAPPING_DISTANCE, LINE_WIDTH } from '../../../constants/d2Constants.js'; import { SHAPE_TYPE_PROPERTIES } from '../../../constants/shapeTypeProperties.js'; import { getSnappingPoints } from '../../../utils/objectSelectors.js'; diff --git a/src/reducer/d2/tools/photoGuideReducer.js b/src/reducer/d2/tools/photoGuideReducer.js index c4a1f09..6e1e130 100644 --- a/src/reducer/d2/tools/photoGuideReducer.js +++ b/src/reducer/d2/tools/photoGuideReducer.js @@ -1,6 +1,6 @@ import update from 'react-addons-update'; import * as actions from '../../../actions/index.js'; -import { addObject } from '../../../reducers/objectReducers.js'; +import { addObject } from '../../../reducer/objectReducers.js'; import createDebug from 'debug'; const debug = createDebug('d3d:reducer:photoGuide'); diff --git a/src/reducer/d2/tools/shapes/starReducer.js b/src/reducer/d2/tools/shapes/starReducer.js index 16b15b7..a7a95f7 100644 --- a/src/reducer/d2/tools/shapes/starReducer.js +++ b/src/reducer/d2/tools/shapes/starReducer.js @@ -1,6 +1,6 @@ import update from 'react-addons-update'; import * as actions from '../../../../actions/index.js'; -import { addObjectActive2D, addObject, setActive2D } from '../../../../objectReducers.js'; +import { addObjectActive2D, addObject, setActive2D } from '../../../objectReducers.js'; import { Matrix, Vector } from 'cal'; // import createDebug from 'debug'; // const debug = createDebug('d3d:reducer:star'); diff --git a/src/reducer/d2/tools/textReducer.js b/src/reducer/d2/tools/textReducer.js index 19d8acd..b7cb8bb 100644 --- a/src/reducer/d2/tools/textReducer.js +++ b/src/reducer/d2/tools/textReducer.js @@ -2,7 +2,7 @@ import { Matrix, Vector } from 'cal'; import update from 'react-addons-update'; import * as actions from '../../../actions/index.js'; import createDebug from 'debug'; -import { addObjectActive2D, setActive2D, removeObject } from '../../../reducers/objectReducers.js'; +import { addObjectActive2D, setActive2D, removeObject } from '../../../reducer/objectReducers.js'; const debug = createDebug('d3d:reducer:text'); export default function textReducer(state, action) { diff --git a/src/reducer/selectionOperationReducer.js b/src/reducer/selectionOperationReducer.js index bc37ad9..dc21ba7 100644 --- a/src/reducer/selectionOperationReducer.js +++ b/src/reducer/selectionOperationReducer.js @@ -1,7 +1,7 @@ import update from 'react-addons-update'; import ClipperShape from 'clipper-js'; import { Matrix } from 'cal'; -import { addObject, removeObject } from '../objectReducers.js'; +import { addObject, removeObject } from './objectReducers.js'; import { recursiveClone } from '../utils/clone.js'; import { shapeToPoints } from '../shape/shapeToPoints.js'; import { applyMatrixOnShape, pathToVectorPath } from '../utils/vectorUtils.js'; diff --git a/src/utils/subtractShapeFromState.js b/src/utils/subtractShapeFromState.js index a449f76..5fb985d 100644 --- a/src/utils/subtractShapeFromState.js +++ b/src/utils/subtractShapeFromState.js @@ -2,11 +2,11 @@ import update from 'react-addons-update'; import { Matrix } from 'cal'; import ClipperShape from 'clipper-js'; import { recursiveClone } from './clone.js'; -import { addObject, removeObject } from '../reducers/objectReducers.js'; +import { addObject, removeObject } from '../reducer/objectReducers.js'; import { SHAPE_TYPE_PROPERTIES } from '../constants/shapeTypeProperties.js'; import { shapeToPoints } from '../shape/shapeToPoints.js'; import { applyMatrixOnShape, pathToVectorPath } from './vectorUtils.js'; -import { findEndPointIndexesOfPaths, mergePaths } from '../reducers/pointsReducers.js'; +import { findEndPointIndexesOfPaths, mergePaths } from '../reducer/pointsReducers.js'; import R from 'ramda'; // import createDebug from 'debug'; // const debug = createDebug('d3d:util:substractShapeFromState');