Don't clear canvas if debug mode
This commit is contained in:
parent
28a5f29357
commit
31af85b996
|
@ -76,6 +76,12 @@ init: function (id, width, height, keyDown, keyUp, mouseDown, mouseUp) {
|
||||||
|
|
||||||
clear: function () {
|
clear: function () {
|
||||||
Canvas.ctx.clearRect(0, 0, Canvas.c_wx, Canvas.c_wy);
|
Canvas.ctx.clearRect(0, 0, Canvas.c_wx, Canvas.c_wy);
|
||||||
|
var c = $(Canvas.id);
|
||||||
|
c.width = 640;
|
||||||
|
c.height = 20;
|
||||||
|
},
|
||||||
|
|
||||||
|
stop: function () {
|
||||||
var c = $(Canvas.id);
|
var c = $(Canvas.id);
|
||||||
document.removeEvents('keydown');
|
document.removeEvents('keydown');
|
||||||
document.removeEvents('keyup');
|
document.removeEvents('keyup');
|
||||||
|
@ -85,9 +91,6 @@ clear: function () {
|
||||||
/* Work around right and middle click browser behaviors */
|
/* Work around right and middle click browser behaviors */
|
||||||
document.removeEvents('click');
|
document.removeEvents('click');
|
||||||
document.body.removeEvents('contextmenu');
|
document.body.removeEvents('contextmenu');
|
||||||
|
|
||||||
c.width = 640;
|
|
||||||
c.height = 20;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
draw: function () {
|
draw: function () {
|
||||||
|
|
5
vnc.js
5
vnc.js
|
@ -772,7 +772,10 @@ disconnect: function () {
|
||||||
RFB.ws.close();
|
RFB.ws.close();
|
||||||
}
|
}
|
||||||
if (Canvas.ctx) {
|
if (Canvas.ctx) {
|
||||||
Canvas.clear();
|
Canvas.stop();
|
||||||
|
if (! /__debug__$/i.test(document.location.href)) {
|
||||||
|
Canvas.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$('connectButton').value = "Connect";
|
$('connectButton').value = "Connect";
|
||||||
$('connectButton').onclick = RFB.connect;
|
$('connectButton').onclick = RFB.connect;
|
||||||
|
|
Loading…
Reference in New Issue