Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Resizing widget programmatically and the minimize/maximize effect

$
0
0
I have a custom made widget which has a few states and depending on the state the window resizes a bit to accomedate the content of the different states. This all works fine.

My issue is when a user minimizes a widget and then reopens it. The widget will always default back to it's orginal size regardless of state.

My first thought was to correct this in the widget open handler. However - it seems the effect that the viewer uses to maximize/minimize a widget must get ahold of the default size before the open widget handler fires since I can see the widget resize to what I would like as the effect starts, then morphs back to default as the effect ends.

As a bandaid I've added a flag which I set in the widget minimized handler and then reset in the widget open handler so I know if the widget is opening or minimizing. Then I added an effectEnd handler for the widgettemplate and if it's not being minimized I set the size appropriately. What the user sees is the widget animates open to default size then snap back to the correct size for the current state.

I feel like there must be a way to get a hold of the size that the animation effect is using on minimize and reopen. Something I'm missing here?

Oh and I've tried setting default sizes for each state by way of width.<statename> = xxx etc. No go.

Viewing all articles
Browse latest Browse all 2097

Trending Articles