mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-25 23:35:21 +02:00
Rotation works for the host properly now.
This commit is contained in:
@@ -150,8 +150,8 @@ module.exports = function DeviceScreenDirective($document, ScalingService, Vendo
|
||||
if (!loading && scope.$parent.showScreen && scope.device) {
|
||||
loading = true
|
||||
imageRender.load(scope.device.display.url +
|
||||
'?width=' + boundingWidth * guestDisplayDensity +
|
||||
'&height=' + boundingHeight * guestDisplayDensity +
|
||||
'?width=' + Math.floor(boundingWidth * guestDisplayDensity) +
|
||||
'&height=' + Math.floor(boundingHeight * guestDisplayDensity) +
|
||||
'&time=' + Date.now()
|
||||
)
|
||||
}
|
||||
@@ -302,6 +302,16 @@ module.exports = function DeviceScreenDirective($document, ScalingService, Vendo
|
||||
rotation = r || 0
|
||||
})
|
||||
|
||||
scope.$on('guest-portrait', function () {
|
||||
scope.control.rotate(0)
|
||||
// updateBounds()
|
||||
})
|
||||
|
||||
scope.$on('guest-landscape', function () {
|
||||
scope.control.rotate(90)
|
||||
// updateBounds()
|
||||
})
|
||||
|
||||
scope.$on('$destroy', off)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user