fixed bugs in dispatching of commands

This commit is contained in:
Borys Levytskyi
2015-04-03 03:51:00 +03:00
parent 86349c9c30
commit a7d2077305
5 changed files with 69 additions and 84 deletions

View File

@@ -3,14 +3,14 @@
app.controller('expressionInputCtrl', {
$dispatcher:null,
attachView: function (viewElement) {
var d = this.$dispatcher;
viewElement.addEventListener('keyup', function (args) {
if (args.keyCode != 13) {
return;
}
// Enter
this.$dispatcher.dispatch(args.srcElement.value);
d.dispatch(args.srcElement.value);
args.srcElement.value = '';
});
}