mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 10:53:21 +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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user