Animate zooming

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-04-02 10:09:53 +02:00
parent 33a1006488
commit 7068996b60

View File

@@ -274,6 +274,7 @@ export default class ImageView extends React.Component {
// image causing it translate in the wrong direction.
const style = {
cursor: cursor,
transition: this.state.moving ? null : "transform 200ms ease 0s",
transform: `translateX(${translatePixelsX})
translateY(${translatePixelsY})
scale(${zoomPercentage})