|
@ -32,8 +32,16 @@ function init() { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function onOpen(evt) { |
|
|
function resize(){ |
|
|
|
|
|
var app = document.getElementById('app'); |
|
|
|
|
|
app.style.width = (window.innerWidth - 8) + 'px'; |
|
|
|
|
|
app.style.height = (window.innerHeight - 4) + 'px'; |
|
|
updateUser(); |
|
|
updateUser(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onOpen(evt) { |
|
|
|
|
|
resize(); |
|
|
|
|
|
window.addEventListener('resize', resize, false); |
|
|
setInterval(poll, speed, true); |
|
|
setInterval(poll, speed, true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -162,7 +170,7 @@ function drawRemove(line){ |
|
|
function updateUser() { |
|
|
function updateUser() { |
|
|
var myself = { |
|
|
var myself = { |
|
|
name: myName, |
|
|
name: myName, |
|
|
size: {width: window.innerWidth, height: window.innerHeight} |
|
|
size: {width: window.innerWidth - 8, height: window.innerHeight - 4} |
|
|
}; |
|
|
}; |
|
|
var packet = { |
|
|
var packet = { |
|
|
command: 'update user', |
|
|
command: 'update user', |
|
|