mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
Fix cache()
method of Konva.Arrow()
. close #819
This commit is contained in:
@@ -112,6 +112,17 @@ export class Arrow extends Line<ArrowConfig> {
|
||||
}
|
||||
}
|
||||
|
||||
getSelfRect() {
|
||||
const lineRect = super.getSelfRect();
|
||||
const offset = this.pointerWidth() / 2;
|
||||
return {
|
||||
x: lineRect.x - offset,
|
||||
y: lineRect.y - offset,
|
||||
width: lineRect.width + offset * 2,
|
||||
height: lineRect.height + offset * 2,
|
||||
}
|
||||
}
|
||||
|
||||
pointerLength: GetSet<number, this>;
|
||||
pointerWidth: GetSet<number, this>;
|
||||
pointerAtBeginning: GetSet<boolean, this>;
|
||||
|
Reference in New Issue
Block a user