Only update view bounds if zoomToFit was truthy

This commit is contained in:
Paul Kaplan 2019-06-21 08:56:32 -04:00
parent 867935d185
commit fc08becbf3

View file

@ -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) {