Palettes in Tabs not displaying

Good day,

I’m creating an application that requires the use of multiple palettes, but I don’t want them all shown at once, so I put them in a Tab Container to only show one at a time. This works great for the palette in the initial tab.

The issue is that all other palettes are invisible in the other tabs. Any suggestions? I already tried palette.requestUpdate() and palette.layoutDiagram(true) on tab change to no avail.

Thanks in advance!

  • Tim

EDIT: If all else fails, I can go to Drag & Drop HTML palettes, but would prefer to use the GoJS way if possible.

It’s hard to say. Do you have any code that we could reproduce this with?

You can always email us attachments, gojs (at) nwoods.com

Have a look at this accordion sample, which uses .accordion from jQuery UI

Note that I had to place a requestUpdate in the “activate” callback (also if you have multiple palettes/diagrams, be sure you’re calling requestUpdate on the right one!)

$("#accordion").accordion({ active: false, animate: false, collapsible: true, activate: function(event, ui) { myPalette.requestUpdate(); } }); The callback/location needed to place a requestUpdate call in differs by plugin/library, but generally you want to do it once you're certain the size of the canvas isn't going to change anymore.

Thanks for your responses, the problem was actually that I was placing all the palettes into the same DOM node by accident! I fixed that and it all works great now!

Thanks!

Hi Turnert/Simon
I have same issue with gojs palettes not displaying withing tabs.
can you please help me how to solve my problem?

I am using html like that

You should edit your post to make sure it shows clearly what you want to say.

You might want to read: Resizing Diagrams -- Northwoods Software