Skip to content

Commit

Permalink
Merge pull request #51 from hashwin/hashwin/fix_label
Browse files Browse the repository at this point in the history
Fix label layers
  • Loading branch information
pierpo authored Aug 4, 2019
2 parents 8e18ce6 + a826ab6 commit 0d8332b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/SvgArrow.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ const SvgArrow = ({
markerEnd={`url(${location.href}#${arrowMarkerId})`}
/>
{arrowLabel && (
<foreignObject x={xl} y={yl} width={wl} height={hl} style={{overflow:'visible'}}>
<foreignObject x={xl} y={yl} width={wl} height={hl} style={{overflow:'visible', pointerEvents: 'none'}}>
<div
style={{
width: wl,
height: hl,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
left: '50%',
top: '50%',
transform: 'translateX(-50%) translateY(-50%)',
pointerEvents: 'all'
}}
>
<div>{arrowLabel}</div>
Expand Down

0 comments on commit 0d8332b

Please sign in to comment.