Open agarwalishan opened 3 years ago
@dylanvorster Any updates on this? Could you please fix it I have to use label on right angle links only.
@agarwalishan @dylanvorster Any updates on this?
any updates?
any updates on this? @dylanvorster or where can i custom it?
Maybe same solution applies as described here? https://github.com/projectstorm/react-diagrams/issues/223#issuecomment-544273491
I'm also having issues, not solved by #223
I still have the same issue. Does anyone have a solution ? @dylanvorster
I have not fully solved this, and switched away from using labels, but here is my findings:
Messy code as reference, https://github.com/rzfzr/mdd4/blob/main/src/pages/Editor.tsx
I finally manage to find what is going wrong.
It comes from this function
which is used to determine the labelPosition. However, to calculate the position, it needs the renderedPaths
, which is never set in RightAngleWidget
due to this line:
Changing this line to
this.refPaths = paths.map(path => path.props.forwardRef)
solve the issue, but I'm pretty sure that it is not the best way to do it.
Maybe @dylanvorster will have an opinion :)
Any new updates?
@ladislas14's solution did not work for me... I'm also noticing that the label does not move when I move the link..., only the diagram
When I am using DefaultLinkModel labels appear at correct positions as in the demo but when I am using RightAnglelinkModel labels are getting positioned to top corner probably (0,0) of the canvas. In the below pic labels for both the links appear at same coordinate (they are overlapping). Can someone please tell what could be the reason?