refactor: simplify rectangle drawing code in Transformer class

This commit is contained in:
Anton Lavrevov
2026-01-14 20:47:11 -05:00
parent 50c0043084
commit e673319445

View File

@@ -626,12 +626,7 @@ export class Transformer extends Group {
const height = shape.height();
ctx.beginPath();
ctx.rect(
-padding,
-padding,
width + padding * 2,
height + padding * 2
);
ctx.rect(-padding, -padding, width + padding * 2, height + padding * 2);
if (tr.rotateEnabled() && tr.rotateLineVisible()) {
// Calculate rotation line position based on rotateAnchorAngle