Skip to content

Commit

Permalink
Merge pull request #43 from jazzqi/master
Browse files Browse the repository at this point in the history
fix arrowLabel missing caused by 0 width/height foreignObject
  • Loading branch information
pierpo authored Apr 23, 2019
2 parents 4c8a9ad + c6789a3 commit 9b7b286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SvgArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export function computeLabelDimensions(
xe: number,
ye: number,
): { xl: number, yl: number, wl: number, hl: number } {
const wl = Math.abs(xe - xs);
const hl = Math.abs(ye - ys);
const wl = Math.max(Math.abs(xe - xs), 1);
const hl = Math.max(Math.abs(ye - ys), 1);

const xl = xe > xs ? xs : xe;
const yl = ye > ys ? ys : ye;
Expand Down

0 comments on commit 9b7b286

Please sign in to comment.