Go JS palette not showing up nodes

Hello Team,

I am building a palette for drawing diagram. But initially when the page loads, it doesn’t show the items in my palette .I could not find any error in console and the moment F12 is clicked, the palette loads the contents. Also while loading initially, i can find the auto-generated div tags after the palette having height and width as 1 px and 18px instead of higher values. I suspect this to be the reason. But since it is auto generated by GoJS, i have no clue why it fails to get proper height and width

Please find the screenshot of palette and source code for the same.
Any help is much appreciated.
Thanks,
Hridya

Actually, I think the Palette Diagram is showing the contents, but the DIV is only 18x75 pixels wide and high, which makes it appear as if there were nothing there.

My guess is that you are initializing the Palette before the page has been laid out, when the DIV holding the Palette is still 1x1. Call Diagram.requestUpdate after the DIV has gotten the size that you expect. Or initialize the Palette only after the DIV has the correct size.

http://gojs.net/latest/intro/resizing.html

Thanks Walter.It works now. I was initialising it before the div got the proper size.