mirror of
https://github.com/lxsang/antd-web-apps
synced 2025-07-27 02:59:47 +02:00
fix
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Generated by CoffeeScript 1.9.3
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
var decodeJPEG, decodeRaw, getImageData, onmessage, pixelValue, resolution, update;
|
||||
|
||||
importScripts('pako.min.js');
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Generated by CoffeeScript 1.9.3
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
(function() {
|
||||
var APIManager, BaseObject, MarkOn, WVNC, require,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
@ -228,7 +228,6 @@
|
||||
if (!me.canvas) {
|
||||
return;
|
||||
}
|
||||
($(me.canvas)).css("cursor", "none");
|
||||
($(me.canvas)).contextmenu(function(e) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
@ -249,17 +248,12 @@
|
||||
return sendMouseLocation(e);
|
||||
});
|
||||
me.canvas.onkeydown = me.canvas.onkeyup = me.canvas.onkeypress = function(e) {
|
||||
var code;
|
||||
if (e.key === "Shift") {
|
||||
code = 16;
|
||||
} else if (e.ctrlKey) {
|
||||
code = 17;
|
||||
} else if (e.altKey) {
|
||||
code = 18;
|
||||
} else if (e.metaKey) {
|
||||
code = 91;
|
||||
var code, keycode;
|
||||
keycode = e.keyCode;
|
||||
if ((keycode > 47 && keycode < 58) || (keycode > 64 && keycode < 91) || (keycode > 95 && keycode < 112) || (keycode > 185 && keycode < 193) || (keycode > 218 && keycode < 223)) {
|
||||
code = e.key.charCodeAt(0);
|
||||
} else {
|
||||
code = String.charCodeAt(e.key);
|
||||
code = keycode;
|
||||
}
|
||||
if (e.type === "keydown") {
|
||||
me.sendKeyEvent(code, 1);
|
||||
@ -366,9 +360,9 @@
|
||||
|
||||
WVNC.prototype.initConnection = function() {
|
||||
var data, rate, vncserver;
|
||||
vncserver = "localhost:5901";
|
||||
vncserver = "192.168.1.20:5901";
|
||||
data = new Uint8Array(vncserver.length + 5);
|
||||
data[0] = 16;
|
||||
data[0] = 32;
|
||||
|
||||
/*
|
||||
flag:
|
||||
@ -377,7 +371,7 @@
|
||||
2: raw data compressed by zlib
|
||||
3: jpeg data compressed by zlib
|
||||
*/
|
||||
data[1] = 2;
|
||||
data[1] = 3;
|
||||
data[2] = 50;
|
||||
rate = 30;
|
||||
data[3] = rate & 0xFF;
|
||||
@ -408,7 +402,7 @@
|
||||
data = new Uint8Array(2);
|
||||
data[0] = code;
|
||||
data[1] = v;
|
||||
console.log(String.fromCharCode(code), v);
|
||||
console.log(code, v);
|
||||
return this.socket.send(this.buildCommand(0x06, data));
|
||||
};
|
||||
|
||||
@ -444,7 +438,7 @@
|
||||
return console.log("Error", dec.decode(data));
|
||||
case 0x81:
|
||||
console.log("Request for password");
|
||||
pass = "!x$@n9";
|
||||
pass = "lxsan9";
|
||||
return this.socket.send(this.buildCommand(0x02, pass));
|
||||
case 0x82:
|
||||
console.log("Request for login");
|
||||
|
Reference in New Issue
Block a user