mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
Only update view bounds if zoomToFit was truthy
This commit is contained in:
parent
867935d185
commit
fc08becbf3
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue