I use mui Unstable_Popup component that could drag on the react flow component. Its draged well, but the old area of Unstable_Popup remain coverd. How to erase this area? Thks.
return (
<>
<BaseEdge path={edgePath} markerEnd={markerEnd} style={{stroke:color}} />
<EdgeLabelRenderer>
<div
onClick={handleClick}
style={{
position: 'absolute',
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,
fontSize: 12,
// everything inside EdgeLabelRenderer has no pointer events by default
// if you have an interactive element, set pointer-events: all
background: '#ffcc00',
paddingLeft: 10,
paddingRight:10,
paddingTop:4,
paddingBottom:4,
borderRadius: 5,
fontWeight: 700,
pointerEvents: 'all',
}}
className="nopan edgeObject"
>
{label}
</div>
<Popup id={id} open={open} anchor={anchorEl}>
<Draggable handle='.handleEdge'>
<Paper><ForwardPanel handleClose={handleClose} pair={t} {...props} /></Paper>
</Draggable>
</Popup>
</EdgeLabelRenderer>
</>
);
I use mui Unstable_Popup component that could drag on the react flow component. Its draged well, but the old area of Unstable_Popup remain coverd. How to erase this area? Thks.