diff options
author | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-23 13:53:51 +0800 |
---|---|---|
committer | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-23 13:53:51 +0800 |
commit | 527dce9247d06705d089ea75a81638d5c486cd7e (patch) | |
tree | 1e7df3cb2a46c42e316cb831a8fcda1d3633f6bf /src/client/views/nodes/ImageBox.tsx | |
parent | c4a448445471b64dd13990245f16bc10625b28c0 (diff) | |
parent | 87150752e9ec0b984209a3e4fa757dfee18a788b (diff) |
Merge branch 'master' into mobile_revision_direct
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 27b20db14..225d03104 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -397,15 +397,15 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps, ImageD const shift = (rotation % 180) ? (nativeHeight - nativeWidth) * (1 - 1 / aspect) : 0; this.resize(srcpath); let transformOrigin = "center center"; - let transform = `translate(0%, 0%) rotate(${rotation}deg) scale(${aspect})` + let transform = `translate(0%, 0%) rotate(${rotation}deg) scale(${aspect})`; if (rotation === 90 || rotation === -270) { transformOrigin = "top left"; - transform = `translate(100%, 0%) rotate(${rotation}deg) scale(${aspect})` + transform = `translate(100%, 0%) rotate(${rotation}deg) scale(${aspect})`; } else if (rotation === 180) { - transform = `rotate(${rotation}deg) scale(${aspect})` + transform = `rotate(${rotation}deg) scale(${aspect})`; } else if (rotation === 270 || rotation === -90) { transformOrigin = "right top"; - transform = `translate(-100%, 0%) rotate(${rotation}deg) scale(${aspect})` + transform = `translate(-100%, 0%) rotate(${rotation}deg) scale(${aspect})`; } return <div className="imageBox-cont" key={this.layoutDoc[Id]} ref={this.createDropTarget}> |