1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Fix misc eslint errors.

This commit is contained in:
Simo Kinnunen 2015-10-05 11:55:24 +09:00
parent d335821ac8
commit a902c66131
2 changed files with 9 additions and 8 deletions

View file

@ -5,6 +5,7 @@
"rules": {
"comma-style": [2, "first"],
"no-extra-semi": 2,
"no-underscore-dangle": 0,
"quotes": [2, "single"],
"semi": [2, "never"],
"space-before-blocks": [2, "always"],

View file

@ -27,7 +27,7 @@ function VncConnection(conn, options) {
this._serverPixelFormat = new PixelFormat({
bitsPerPixel: 32
, depth: 24
, bigEndianFlag: os.endianness() == 'BE' ? 1 : 0
, bigEndianFlag: os.endianness() === 'BE' ? 1 : 0
, trueColorFlag: 1
, redMax: 255
, greenMax: 255
@ -111,13 +111,13 @@ VncConnection.prototype.writeFramebufferUpdate = function(rectangles) {
this._write(chunk)
rectangles.forEach(function(rect) {
var chunk = new Buffer(12)
chunk.writeUInt16BE(rect.xPosition, 0)
chunk.writeUInt16BE(rect.yPosition, 2)
chunk.writeUInt16BE(rect.width, 4)
chunk.writeUInt16BE(rect.height, 6)
chunk.writeInt32BE(rect.encodingType, 8)
this._write(chunk)
var rchunk = new Buffer(12)
rchunk.writeUInt16BE(rect.xPosition, 0)
rchunk.writeUInt16BE(rect.yPosition, 2)
rchunk.writeUInt16BE(rect.width, 4)
rchunk.writeUInt16BE(rect.height, 6)
rchunk.writeInt32BE(rect.encodingType, 8)
this._write(rchunk)
switch (rect.encodingType) {
case VncConnection.ENCODING_RAW: