Resetting pinch zoom (#261)

* Resetting pinch zoom

* Bumping version
This commit is contained in:
Jake Archibald
2018-11-11 04:28:39 -08:00
committed by GitHub
parent 2ca97ef586
commit 8d63125b13
2 changed files with 10 additions and 1 deletions

View File

@@ -48,6 +48,15 @@ export default class Output extends Component<Props, State> {
const leftDraw = this.leftDrawable();
const rightDraw = this.rightDrawable();
// Reset the pinch zoom, which may have an position set from the previous view, after pressing
// the back button.
this.pinchZoomLeft!.setTransform({
allowChangeEvent: true,
x: 0,
y: 0,
scale: 1,
});
if (this.canvasLeft && leftDraw) {
drawDataToCanvas(this.canvasLeft, leftDraw);
}