Adornment resizing

I have set two templates for a node - one template for palette and another for the diagram.
When I drag the node from the palette to the diagram, the node gets enlarged. This is probably due to the panel filling up available space up to the set of maxSize.
I don’t want to hardcore the desiredSize because I want the node to resize depending on the picture loaded :-)