Thanks Alex for the code snippet. Actually, the example given below was simplied for the sake of readability.
In real, I need a generic solution because there are many popups, all driven by Parsley, and I don't know where the popups will be lying. I would like also to use the new experimental Callout of SDK 4.10, managed by Parsley. I will work on combining PopupAnchor, Callout and Parsley's CairngormPopupSupport so that they can work together. Thanks again. Maurice -----Message d'origine----- De : Alex Harui [mailto:[email protected]] Envoyé : jeudi 1 août 2013 00:16 À : [email protected] Objet : Re: Problem with PopupManager I think all I would add is popup.x = Math.min(popup.x, systemManager.screen.right - popup.width); On 7/31/13 12:22 PM, "Maurice Amsellem" <[email protected]> wrote: >Thanks, I will raise a feature request for that. > >In the meantime, I intend to adapt some of the logic from PopupAnchor >(functions calculatePopUpPosition():Point and determinePosition) into >PopupWrapper subclass. > >Do you think it's a good idea ? > >Maurice > >-----Message d'origine----- >De : Alex Harui [mailto:[email protected]] Envoyé : mercredi 31 juillet >2013 21:13 À : [email protected] Objet : Re: Problem with >PopupManager > >There is to right side bounds checking in PopUpManager. Probably a >good feature to request. > >-Alex > >From: Maurice Amsellem ><[email protected]<mailto:[email protected]>> >Reply-To: "[email protected]<mailto:[email protected]>" ><[email protected]<mailto:[email protected]>> >Date: Wednesday, July 31, 2013 9:52 AM >To: "[email protected]<mailto:[email protected]>" ><[email protected]<mailto:[email protected]>> >Subject: Problem with PopupManager > ><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" >xmlns:s="library://ns.adobe.com/flex/spark"> > <s:Button id="btPopup2" top="80" right="50" label="Pop2" >click="btPopup2_clickHandler(event)"/> > <fx:Script><![CDATA[ > import mx.managers.PopUpManager; > private function btPopup2_clickHandler(event:MouseEvent):void { > var panel: Panel = new Panel(); > with(panel){ > id="panel"; > title="Panel2"; > width=200; > height =150; > } > PopUpManager.addPopUp(panel,btPopup2); > PopUpManager.centerPopUp(panel); > } > ]]></fx:Script> ></s:Application> >
