diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-13 12:00:39 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-13 12:00:39 +0900 |
commit | 082450928a35ea8d35fdbcd176dbd972e45acfec (patch) | |
tree | 5973294649d322b1dc6edd2bbb07658aa499fab3 /src/shared | |
parent | e7342e9c237e1deea69ed66e07b7f79cd534056e (diff) |
use key-queue for input
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/actions.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/shared/actions.js b/src/shared/actions.js new file mode 100644 index 0000000..2e10810 --- /dev/null +++ b/src/shared/actions.js @@ -0,0 +1,22 @@ +export const TABS_PREV = 'tabs.prev'; +export const TABS_NEXT = 'tabs.next'; +export const SCROLL_UP = 'scroll.up'; +export const SCROLL_DOWN = 'scroll.down'; + +const BACKGROUND_ACTION_SET = new Set([ + TABS_PREV, + TABS_NEXT +]); + +const CONTENT_ACTION_SET = new Set([ + SCROLL_UP, + SCROLL_DOWN +]); + +export const isBackgroundAction = (action) => { + return BACKGROUND_ACTION_SET.has(action); +}; + +export const isContentAction = (action) => { + return CONTENT_ACTION_SET.has(action); +}; |