Skip to content

Commit

Permalink
Fix label layers
Browse files Browse the repository at this point in the history
  • Loading branch information
hashwin committed Jul 9, 2019
1 parent 8e18ce6 commit a826ab6
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 a826ab6

Please sign in to comment.