Rotation works for the host properly now.

This commit is contained in:
Gunther Brunner
2014-05-28 12:18:47 +09:00
parent 30ca92301a
commit 4d9b7d2d70
2 changed files with 28 additions and 19 deletions

View File

@@ -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)
}
}