fix slow panning in image cropper

This commit is contained in:
or-else
2025-08-20 20:58:07 +03:00
parent 92611680e4
commit 5bb829a6bc
+2 -2
View File
@@ -193,8 +193,8 @@ export default class Cropper extends React.Component {
// Perform image panning.
translate(pageX, pageY) {
const dX = pageX - this.mouseX;
const dY = pageY - this.mouseY;
const dX = (pageX - this.mouseX) / this.state.zoom;
const dY = (pageY - this.mouseY) / this.state.zoom;
this.mouseX = pageX;
this.mouseY = pageY;