Skip to content

Commit

Permalink
Finally fix the zoom after pan bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ghent360 committed Apr 29, 2018
1 parent 77d2b60 commit 751596e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CanvasViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ export class CanvasViewer extends React.Component<CanvasViewerProps, CanvasViewe
this.redrawTimer = setTimeout(() => {
this.setState({
scale:this.state.scale * this.scale,
offsetX:this.state.offsetX + this.offsetX,
offsetY:this.state.offsetY + this.offsetY});
offsetX:this.state.offsetX * this.scale + this.offsetX,
offsetY:this.state.offsetY * this.scale + this.offsetY});
},
500);
}
Expand Down

0 comments on commit 751596e

Please sign in to comment.