mirror of
https://github.com/konvajs/konva.git
synced 2026-02-24 20:26:01 +08:00
refactor: simplify rectangle drawing code in Transformer class
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user