You could define an “InitialLayoutCompleted” DiagramEvent on the visible Palette that set the DIV’s height to the Palette’s Diagram.documentBounds .height
and then called Diagram.requestUpdate on the Palette.
When the user selects a different accordion panel/tab, you could consider changing the DIV height again, if you want.