aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-10-11 17:20:02 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-10-11 17:33:27 +0900
commitf66e75575dd26b7f60e70c9856d8cd56770f74e7 (patch)
tree30373c16b1d3d9743fbae2413cca8dc313c8e136 /src
parente6d990966a99f4a80606ef42da8da9e009826f43 (diff)
Store x position into marks
Diffstat (limited to 'src')
-rw-r--r--src/content/actions/mark.js3
-rw-r--r--src/content/reducers/mark.js2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/content/actions/mark.js b/src/content/actions/mark.js
index baf5825..1f5174e 100644
--- a/src/content/actions/mark.js
+++ b/src/content/actions/mark.js
@@ -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,
};
};
diff --git a/src/content/reducers/mark.js b/src/content/reducers/mark.js
index b6137f3..2c96cc5 100644
--- a/src/content/reducers/mark.js
+++ b/src/content/reducers/mark.js
@@ -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: