Blazor-Diagrams / Blazor.Diagrams

A fully customizable and extensible all-purpose diagrams library for Blazor
https://blazor-diagrams.zhaytam.com
MIT License
919 stars 176 forks source link

Labels do not display #288

Open dandeto opened 1 year ago

dandeto commented 1 year ago

Labels do not display when I use the sample code found here: https://github.com/Blazor-Diagrams/Blazor.Diagrams/blob/master/samples/SharedDemo/Demos/Links/LabelsDemo.razor.cs My label does show up in the svg code, it's just not rendering. Also, this issue is present on the demo online here: https://blazor-diagrams.zhaytam.com/links/labels

Related: #109

image image

<foreignObject x="226.00193303765604" y="162.89994599331078">
<div class="link-label">content</div>
</foreignObject>

I haven't tried the pre-release to see if it's fixed there...

zHaytam commented 1 year ago

Hello,

I can see the labels in the demo website... What browser are you using? Can you check if the foreignObejct contains overflow: visible;

dandeto commented 1 year ago

I use firefox, but I can see them in chrome. Yes, foreignObject contains overflow: visible

zHaytam commented 1 year ago

I just downloaded Firefox and you are right, they don't show. I am investigating.

zHaytam commented 1 year ago

This fixes it for me:

.link foreignObject {
  width: 1px;
  height: 1px;
}

I will be adding it in 3.0.0, please confirm it works for you as well

dandeto commented 1 year ago

That worked for me, thank you!

prof3000 commented 2 months ago

Good day please help small example how to make color circle and box make in diagram with text