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

Rotate canvas image on client side when necessary. Minicap now always returns the image in upright position for newer devices.

This commit is contained in:
Simo Kinnunen 2015-04-23 14:45:10 +09:00
parent 7202f102d9
commit 9ea0839b0b
18 changed files with 46 additions and 15 deletions

View file

@ -16,7 +16,11 @@ module.exports.read = function parseBanner(out) {
, virtualWidth: 0
, virtualHeight: 0
, orientation: 0
, quirks: 0
, quirks: {
dumb: false
, alwaysUpright: false
, tear: false
}
}
tryRead = function() {
@ -78,7 +82,9 @@ module.exports.read = function parseBanner(out) {
break
case 23:
// quirks
banner.quirks = chunk[cursor]
banner.quirks.dumb = (chunk[cursor] & 1) === 1
banner.quirks.alwaysUpright = (chunk[cursor] & 2) === 2
banner.quirks.tear = (chunk[cursor] & 4) === 4
break
}