How create node that is horizontally starched to the whole diagram

how create node that is horizontally starched to the whole diagram.

I want to create several nodes each one of them is in a new line
each node should be horizontally starched to the whole diagram

What do you mean by “the whole diagram”?

if the diagram div width is 100px
and my node size 50px
I want the node to starch to the whole 100px not to just 50px
I guess I can write code to query the div width and then bind this to the node size.
but this is complicated and I will need to listen to browser resize and other parts resize

Normally when one talks about the “whole diagram” one includes all of the nodes and links, even those that are scrolled or zoomed beyond the visible area determined by the size of the HTMLDivElement. That area is the Diagram.documentBounds, which does not change as the user scrolls or pans or zooms.

You are talking about using the Diagram.viewportBounds width. And you want to implement a “ViewportBoundsChanged” DiagramEvent listener that changes the width of each of your nodes.

thanks. it works for me