Move to ES6 missing static methods
This commit is contained in:
parent
78db60c760
commit
a607c19f45
|
|
@ -657,10 +657,8 @@ export default class Display {
|
||||||
this.onflush();
|
this.onflush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Class Methods
|
static changeCursor(target, pixels, mask, hotx, hoty, w, h) {
|
||||||
Display.changeCursor = (target, pixels, mask, hotx, hoty, w, h) => {
|
|
||||||
if ((w === 0) || (h === 0)) {
|
if ((w === 0) || (h === 0)) {
|
||||||
target.style.cursor = 'none';
|
target.style.cursor = 'none';
|
||||||
return;
|
return;
|
||||||
|
|
@ -697,4 +695,6 @@ Display.changeCursor = (target, pixels, mask, hotx, hoty, w, h) => {
|
||||||
|
|
||||||
const url = canvas.toDataURL();
|
const url = canvas.toDataURL();
|
||||||
target.style.cursor = 'url(' + url + ')' + hotx + ' ' + hoty + ', default';
|
target.style.cursor = 'url(' + url + ')' + hotx + ' ' + hoty + ', default';
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
16
core/rfb.js
16
core/rfb.js
|
|
@ -1592,6 +1592,14 @@ export default class RFB extends EventTargetMixin {
|
||||||
Log.Info("Sending XVP operation " + op + " (version " + ver + ")");
|
Log.Info("Sending XVP operation " + op + " (version " + ver + ")");
|
||||||
RFB.messages.xvpOp(this._sock, ver, op);
|
RFB.messages.xvpOp(this._sock, ver, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static genDES(password, challenge) {
|
||||||
|
const passwd = [];
|
||||||
|
for (let i = 0; i < password.length; i++) {
|
||||||
|
passwd.push(password.charCodeAt(i));
|
||||||
|
}
|
||||||
|
return (new DES(passwd)).encrypt(challenge);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class Methods
|
// Class Methods
|
||||||
|
|
@ -1892,14 +1900,6 @@ RFB.messages = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
RFB.genDES = (password, challenge) => {
|
|
||||||
const passwd = [];
|
|
||||||
for (let i = 0; i < password.length; i++) {
|
|
||||||
passwd.push(password.charCodeAt(i));
|
|
||||||
}
|
|
||||||
return (new DES(passwd)).encrypt(challenge);
|
|
||||||
};
|
|
||||||
|
|
||||||
RFB.encodingHandlers = {
|
RFB.encodingHandlers = {
|
||||||
RAW() {
|
RAW() {
|
||||||
if (this._FBU.lines === 0) {
|
if (this._FBU.lines === 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue