yaz/commit
syncUI explictly (not a widget class)
author | Michiel Hildebrand |
---|---|
Sat Feb 5 18:21:12 2011 +0100 | |
committer | Michiel Hildebrand |
Sat Feb 5 18:21:12 2011 +0100 | |
commit | 4cf23eb63e644f692779deccd35d8e16f8108d1a |
tree | b8a68d7b3b67f2b6ac02a64457eb14e32661fb4b |
parent | 2054710b19b9c4a414734ec6f6af03719fea83ac |
Diff style: patch stat
diff --git a/web/js/game/players.js b/web/js/game/players.js index 1269226..403da29 100644 --- a/web/js/game/players.js +++ b/web/js/game/players.js @@ -40,6 +40,7 @@ YUI.add('game-players', function(Y) { if(Y.one(this.get("container"))) { this.list = null; this._renderContent(); + this.syncUI(); this.after("playersChange", this.syncUI); } }, @@ -48,7 +49,7 @@ YUI.add('game-players', function(Y) { var players = this.get("players"), nodes = this.list.all("li"); - players.sort(function(p1,p2) {return p2.score - p1.score}); + players.sort(function(p1,p2) { return p2.score - p1.score }); for(var i=0; i < players.length; i++) { var node = nodes.item(i);