Fix cache() method of Konva.Arrow(). close #819

This commit is contained in:
Anton Lavrenov
2020-01-03 08:59:34 -05:00
parent 81a8a4eec1
commit aab7bf1c0f
5 changed files with 1395 additions and 53 deletions

View File

@@ -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>;