fix(ui): pixelRect should always be integer

This commit is contained in:
psychedelicious 2024-08-20 10:18:13 +10:00
parent 6db615ed5a
commit 7f05af4a68

View File

@ -658,8 +658,8 @@ export class CanvasTransformer {
const { minX, minY, maxX, maxY } = extents; const { minX, minY, maxX, maxY } = extents;
this.nodeRect = { ...rect }; this.nodeRect = { ...rect };
this.pixelRect = { this.pixelRect = {
x: rect.x + minX, x: Math.round(rect.x) + minX,
y: rect.y + minY, y: Math.round(rect.y) + minY,
width: maxX - minX, width: maxX - minX,
height: maxY - minY, height: maxY - minY,
}; };