Centering Cards in the Kanban example

In the Kanban example online, is there a way to center the cards rather than left align them?

https://gojs.net/latest/samples/kanban.html

Thanks for a great library!

  • Joe

In the Kanban sample each card is centered in its lane. How is it different in your app? A small screenshot showing what you have now and another one showing what you want instead would help ask your question better.

Thanks for the quick response, Walter. If you go to the online demo and add some text to one of the lane headers (see “Reproduced and More Text” in the image below), you will see that the cards remain left aligned. The image at the very bottom is what I’m trying to achieve.

Hope this helps …

The nodes in each “lane” (i.e. Group) are laid out relative to each other by the Group.layout. They are represented within the Diagram.groupTemplate by a Placeholder. You can change the relative positioning of the Placeholder within its “Auto” Panel by setting its GraphObject.alignment:

            $(go.Placeholder,
              { padding: 12, alignment: go.Spot.Top }),

Here I’ve set it to be aligned at the middle top of the light gray “Rectangle” Shape by the “Auto” Panel.

That did the trick … thanks a ton, Walter!