flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nemi <nemino...@gmail.com>
Subject Re: Modal background is not centered if modal is shown while minimized
Date Tue, 06 Jun 2017 17:11:23 GMT
I had that issue too. That is a bug. I think its reported, but don't recall
the issue ID. Problem could be that PopUpManager somewhere reads
nativeWindow/window/parent size, and if nativeWindow is minimized, size is
0,0 so there bug happens.

Try this workaround/fix: 
1. listen window's native display change state event, 
2. and within it, check if prev state was minimized, and new state is not
(means: user is restoring window)
3. then if true, loop all popup children, check ones you look for (read
class name, or "modalWindow" property of popup child), re-position it and
its background sprite, and set sprites size as parent window's one.
4. user wont notice repositioning and all looks nice

Test it quickly this way: create sample app, with button that does: minimize
app, than after 1 second, creates popup or better few of them(as you can
have more popups in app). When you restore app window, if all popups are
where they should be, you fixed it.

Helpful links:
https://stackoverflow.com/questions/7323505/flex-how-to-determine-if-a-popupmanager-window-is-open-or-when-it-has-closed
https://weflex.wordpress.com/tag/popupmanager/
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/managers/PopUpManagerChildList.html



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Modal-background-is-not-centered-if-modal-is-shown-while-minimized-tp15286p15288.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message