diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-10-11 15:00:50 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-10-11 15:00:50 +0900 |
commit | bf283c732ef9424d365ca1b09ce8b174f61c336c (patch) | |
tree | 3b6ffba5e3a9d2dda059a61fddd2f2b52baf0608 /src/content/actions | |
parent | bf8cfbcb35365f83c94851a78bb0ea797e9d9ae2 (diff) |
Add mark action and reducer
Diffstat (limited to 'src/content/actions')
-rw-r--r-- | src/content/actions/index.js | 6 | ||||
-rw-r--r-- | src/content/actions/mark.js | 25 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/content/actions/index.js b/src/content/actions/index.js index 6976df7..0a16fdf 100644 --- a/src/content/actions/index.js +++ b/src/content/actions/index.js @@ -22,4 +22,10 @@ export default { // Find FIND_SET_KEYWORD: 'find.set.keyword', + + // Mark + MARK_START_SET: 'mark.start.set', + MARK_START_JUMP: 'mark.start.jump', + MARK_CANCEL: 'mark.cancel', + MARK_SET_LOCAL: 'mark.set.local', }; diff --git a/src/content/actions/mark.js b/src/content/actions/mark.js new file mode 100644 index 0000000..baf5825 --- /dev/null +++ b/src/content/actions/mark.js @@ -0,0 +1,25 @@ +import actions from 'content/actions'; + +const startSet = () => { + return { type: actions.MARK_START_SET }; +}; + +const startJump = () => { + return { type: actions.MARK_START_JUMP }; +}; + +const cancel = () => { + return { type: actions.MARK_CANCEL }; +}; + +const setLocal = (key, y) => { + return { + type: actions.MARK_SET_LOCAL, + key, + y, + }; +}; + +export { + startSet, startJump, cancel, setLocal, +}; |