diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-15 12:34:26 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-15 17:42:17 +0900 |
commit | ac5354020e5efdf6e284d4b36696b9f94d46bef9 (patch) | |
tree | b515691907c341a053998bec269e54db1a3a8808 /src/content/components/common/index.js | |
parent | 4c9d0433a6ac851e72d50d6fb0451baa9d35fd35 (diff) |
support multi-frame following
Diffstat (limited to 'src/content/components/common/index.js')
-rw-r--r-- | src/content/components/common/index.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/content/components/common/index.js b/src/content/components/common/index.js index 7673134..a05febd 100644 --- a/src/content/components/common/index.js +++ b/src/content/components/common/index.js @@ -10,10 +10,8 @@ export default class Common { const input = new InputComponent(win.document.body, store); const keymapper = new KeymapperComponent(store); - input.onKey((key, ctrl) => { - follow.key(key, ctrl); - keymapper.key(key, ctrl); - }); + input.onKey((key, ctrl) => follow.key(key, ctrl)); + input.onKey((key, ctrl) => keymapper.key(key, ctrl)); this.store = store; this.children = [ @@ -29,11 +27,12 @@ export default class Common { this.children.forEach(c => c.update()); } - onMessage(message) { + onMessage(message, sender) { switch (message) { case messages.SETTINGS_CHANGED: this.reloadSettings(); } + this.children.forEach(c => c.onMessage(message, sender)); } reloadSettings() { |