Skip to content

Commit

Permalink
Disable rotation if the browser does it already
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiomaffeis committed May 7, 2022
1 parent 1617448 commit cff479d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PictureInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export default {
canvas.height = this.previewHeight * this.pixelRatio
this.context.setTransform(1, 0, 0, 1, 0, 0)
this.context.clearRect(0, 0, canvas.width, canvas.height)
if (this.rotate) {
if (this.rotate && typeof this.imageObject.style.imageOrientation === 'undefined') {
this.context.translate(offsetX * this.pixelRatio, offsetY * this.pixelRatio)
this.context.translate(scaledWidth / 2 * this.pixelRatio, scaledHeight / 2 * this.pixelRatio)
this.context.rotate(this.rotate)
Expand Down

0 comments on commit cff479d

Please sign in to comment.