flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scott matheson <sc...@matheson.it>
Subject Scaleing and Center popups
Date Wed, 06 Jan 2016 21:26:45 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message