flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Scaleing and Center popups
Date Wed, 06 Jan 2016 22:40:28 GMT
What is appHolder?  Maybe scale the SystemManager instead.

On 1/6/16, 1:26 PM, "scott matheson" <scott@matheson.it> wrote:

>Hi
>   I use this code to centre my popups
>   var _class3:ReportsDialogDictation = new ReportsDialogDictation();
>   PopUpManager.addPopUp(_class3, this.parentApplication as
>DisplayObject, true);
>   PopUpManager.centerPopUp(_class3);
>}
>
>
>this works fine
>
>
>when i let the user scale the application
>
>var visibleWidth:Number = systemManager.getVisibleApplicationRect().width;
>var visibleHeight:Number =
>systemManager.getVisibleApplicationRect().height;
>var smallestScale:Number = Math.min(visibleHeight / 768, visibleWidth /
>1024);
>appHolder.scaleX = smallestScale;
>appHolder.scaleY = smallestScale;
>
>
>I still end up with centre popups, but these are popups are small
>
>when i scale the popup it self with this code in the creationComplete
>
> 
>
>
>private function init():void {
>   var visibleWidth:Number =
>systemManager.getVisibleApplicationRect().width;
>   var visibleHeight:Number =
>systemManager.getVisibleApplicationRect().height;
>   var smallestScale:Number = Math.min(visibleHeight / 768, visibleWidth
>/ 1024);
>   this.scaleX = smallestScale;
>   this.scaleY = smallestScale;
>
>}
>
>I end up with the popup not centred
>
>any ideas ?
>
>scott 
>

Mime
View raw message