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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Class Methods
|
||||
Display.changeCursor = (target, pixels, mask, hotx, hoty, w, h) => {
|
||||
static changeCursor(target, pixels, mask, hotx, hoty, w, h) {
|
||||
if ((w === 0) || (h === 0)) {
|
||||
target.style.cursor = 'none';
|
||||
return;
|
||||
|
|
@ -697,4 +695,6 @@ Display.changeCursor = (target, pixels, mask, hotx, hoty, w, h) => {
|
|||
|
||||
const url = canvas.toDataURL();
|
||||
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 + ")");
|
||||
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
|
||||
|
|
@ -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 = {
|
||||
RAW() {
|
||||
if (this._FBU.lines === 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue