Store x position into marks
This commit is contained in:
parent
e6d990966a
commit
f66e75575d
4 changed files with 10 additions and 6 deletions
|
@ -12,10 +12,11 @@ const cancel = () => {
|
|||
return { type: actions.MARK_CANCEL };
|
||||
};
|
||||
|
||||
const setLocal = (key, y) => {
|
||||
const setLocal = (key, x, y) => {
|
||||
return {
|
||||
type: actions.MARK_SET_LOCAL,
|
||||
key,
|
||||
x,
|
||||
y,
|
||||
};
|
||||
};
|
||||
|
|
|
@ -16,7 +16,7 @@ export default function reducer(state = defaultState, action = {}) {
|
|||
return { ...state, setMode: false, jumpMode: false };
|
||||
case actions.MARK_SET_LOCAL: {
|
||||
let marks = { ...state.marks };
|
||||
marks[action.key] = { y: action.y };
|
||||
marks[action.key] = { x: action.x, y: action.y };
|
||||
return { ...state, setMode: false, marks };
|
||||
}
|
||||
default:
|
||||
|
|
Reference in a new issue