From fc08becbf3bdf4f7b5752e2f7d15af8fee614bee Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Fri, 21 Jun 2019 08:56:32 -0400 Subject: [PATCH] Only update view bounds if zoomToFit was truthy --- src/containers/paper-canvas.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/containers/paper-canvas.jsx b/src/containers/paper-canvas.jsx index fe861845..41dff0e7 100644 --- a/src/containers/paper-canvas.jsx +++ b/src/containers/paper-canvas.jsx @@ -150,10 +150,11 @@ class PaperCanvas extends React.Component { maybeZoomToFit (isBitmapMode) { if (this.shouldZoomToFit instanceof paper.Matrix) { paper.view.matrix = this.shouldZoomToFit; + this.props.updateViewBounds(paper.view.matrix); } else if (this.shouldZoomToFit === true) { zoomToFit(isBitmapMode); + this.props.updateViewBounds(paper.view.matrix); } - this.props.updateViewBounds(paper.view.matrix); this.shouldZoomToFit = false; } importSvg (svg, rotationCenterX, rotationCenterY) {