Mercurial > MadButterfly
diff nodejs/mbapp.js @ 911:7c4df3c1027f
Fix the indentation
author | wycc |
---|---|
date | Tue, 19 Oct 2010 04:06:45 +0800 |
parents | 45625c200efe |
children | e4474cac20da |
line wrap: on
line diff
--- a/nodejs/mbapp.js Tue Oct 19 04:04:52 2010 +0800 +++ b/nodejs/mbapp.js Tue Oct 19 04:06:45 2010 +0800 @@ -107,7 +107,9 @@ app.prototype.KeyPress = function(evt) { if (this.onKeyPress) this.onKeyPress(evt.sym); - if (evt.sym in this.keymap) this.keymap[evt.sym](); + if (evt.sym in this.keymap) { + this.keymap[evt.sym](); + } } app.prototype.loop=function() { @@ -135,11 +137,11 @@ app.prototype.addKeyListener=function(key,f) { if (typeof(key) == 'number') this.keymap[key] = f; - else { - for(k in key) { - this.keymap[k] = f; - } + else { + for(k in key) { + this.keymap[k] = f; } + } } var app_with_win = function(display, win) {