Allow seeing user list at low resolutions

This commit is contained in:
Guangcong Luo 2013-12-18 19:10:34 -06:00
parent 905745f614
commit 8da30ea195
2 changed files with 3 additions and 1 deletions

View File

@ -632,6 +632,7 @@
var ChatRoom = this.ChatRoom = ConsoleRoom.extend({
minWidth: 320,
minMainWidth: 580,
maxWidth: 1024,
isSideRoom: true,
initialize: function() {

View File

@ -1211,11 +1211,12 @@
return;
}
var leftMin = (this.curRoom.minWidth || this.curRoom.bestWidth);
var leftMinMain = (this.curRoom.minMainWidth || leftMin);
var rightMin = (this.sideRoom.minWidth || this.sideRoom.bestWidth);
var available = $(window).width();
if (this.curRoom.isSideRoom) {
// we're trying to focus a side room
if (available >= this.rooms[''].tinyWidth + leftMin) {
if (available >= this.rooms[''].tinyWidth + leftMinMain) {
// it fits to the right of the main menu, so do that
this.curSideRoom = this.sideRoom = this.curRoom;
this.curRoom = this.rooms[''];