fix: the offset should not be multiplied by the scale

This commit is contained in:
Kathleen-Xu
2024-11-07 09:42:37 +08:00
committed by GitHub
parent c602f3f4c4
commit 9b791817e1
+1 -1
View File
@@ -54,7 +54,7 @@ class WorkflowImage {
app.canvas.ds.scale = 1;
app.canvas.canvas.width = (bounds[2] - bounds[0]) * scale;
app.canvas.canvas.height = (bounds[3] - bounds[1]) * scale;
app.canvas.ds.offset = [-bounds[0] * scale, -bounds[1] * scale];
app.canvas.ds.offset = [-bounds[0], -bounds[1]];
app.canvas.canvas.getContext("2d").setTransform(scale, 0, 0, scale, 0, 0);
}