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

How to sizing the node #375

Closed JanOfOlympus closed 8 months ago

JanOfOlympus commented 8 months ago

Hi me again :) I saw the "Size" property on Node model. I try initialize it to resize the node but it does not seem to affected here is my code

In DiagramComponent method 'AddNode()'

image

Animation

Do you have any example on hoe to resize the node here? Or I missing something? I don't want to create the custom node here

Thank you so much :)

zHaytam commented 8 months ago

Hello,

Currently, the size of the node is controlled by the html/css, the library will simply use a ResizeObserver to get the size and monitor it.

Unfortunately, you will have to create a custom node to do this.
After all, default nodes are only there as an example, not as something to be used in the long run.

JanOfOlympus commented 8 months ago

@zHaytam ok noted that. Thank you so much :)