mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Revert "Fix canvas rotation being off on devices which are naturally landscape."
Regressions: 1) Flicker badly in Chrome 2) Image gets very blurry because the image is uploaded to the GPU and there are rounding errors 3) Resizing is not smooth again This needs another way of fixing. This reverts commit 9fc1a9c7939b9f464c87a2f99cb06000f5aedcbc.
This commit is contained in:
parent
a9213e0659
commit
f73cac8b24
2 changed files with 19 additions and 12 deletions
|
@ -259,16 +259,16 @@ module.exports = function DeviceScreenDirective($document, ScalingService,
|
|||
// changes from 180 to 270 (it will do a reverse rotation).
|
||||
switch (rotation) {
|
||||
case 0:
|
||||
canvas.style[cssTransform] = 'translate(-50%, -50%) rotate(0deg)'
|
||||
canvas.style[cssTransform] = 'rotate(0deg)'
|
||||
break
|
||||
case 90:
|
||||
canvas.style[cssTransform] = 'translate(-50%, -50%) rotate(-90deg)'
|
||||
canvas.style[cssTransform] = 'rotate(-90deg)'
|
||||
break
|
||||
case 180:
|
||||
canvas.style[cssTransform] = 'translate(-50%, -50%) rotate(-180deg)'
|
||||
canvas.style[cssTransform] = 'rotate(-180deg)'
|
||||
break
|
||||
case 270:
|
||||
canvas.style[cssTransform] = 'translate(-50%, -50%) rotate(90deg)'
|
||||
canvas.style[cssTransform] = 'rotate(90deg)'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue