Thanks for the feedback and the very useful code snippet. Your suggestion seems indeed like a nice balance between performance and not too much additional code, so will try using that!!!
Thanks also for the other advice about using the embed.HTML. I created my own component extending Widget in which I use this.getContentElement().getDomElement() as a parent node to add some more custom content. So the layout manager could decide to throw away these children nodes, was not aware of that? — Peter On 25 Jul 2014, at 13:02, Mustafa Sak <mustafa....@1und1.de> wrote: > Hi, > > it is true that the new dimensions on "resize" event will not applied to the > DOM element of inactive pages. But you will get the computed dimensions on > the event object with the .getData() function [1]. > > But I would advise you to only manipulate visible page content. It's not a > good idea to make DOM depended manipulations for not see able qooxdoo > widgets. Not seeable widgets or parts of widgets will often be removed from > DOM, which often results in side effects at third party libraries. > Furthermore you would slowdown the resizing, if you would manipulate the > content of all pages, however. > > So what's about adding an "appear" listener on resize event for inactive > pages. Here is a small example: http://tinyurl.com/l693cup > > Please mind that the page1 will "alert" immediately, but I guess that is the > best time to apply third party elements anyway. > > One more little advise: Please use qx.ui.embed.Html [2] to add third party > elements on qooxdoo environment, otherwise the layout renderer could throw > your elements away on some conditions. :) > > [1] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.core.Widget~resize!event > [2] http://demo.qooxdoo.org/current/apiviewer/#qx.ui.embed.Html > > Gruß > Mustafa Sak > > Applications & Integration > > 1&1 Internet AG > Ernst-Frey-Straße 10 > DE-76135 Karlsruhe > > > -----Ursprüngliche Nachricht----- > Von: JBaron [mailto:pe...@jbaron.com] > Gesendet: Freitag, 25. Juli 2014 12:21 > An: qooxdoo Development > Betreff: Re: [qooxdoo-devel] Resize events and TabView > > I did some more checking and you are right that the resize event is fired. > However the page is not actually resized, so the child still thinks it is the > same size and it looks like no resize took place (hence my mistake). So is it > possible when I get a resize event to force the inactive page to actually > resize before I ask the child to change it dimensions ? > > - Peter > > On 25 Jul 2014, at 09:32, Mustafa Sak <mustafa....@1und1.de> wrote: > >> Hi, >> >> sorry but I could not verify your sentence on no 1. As you can see here[1] >> there will be "resize" events fired for all pages. >> To use the example please open the log and resize the pane, where the >> tabview is rendered. You will see two debug messages. >> >> >> [1] http://tinyurl.com/n7o6gvv >> >> Gruß >> Mustafa Sak >> >> Applications & Integration >> >> 1&1 Internet AG >> Ernst-Frey-Straße 10 >> DE-76135 Karlsruhe >> >> -----Ursprüngliche Nachricht----- >> Von: JBaron [mailto:pe...@jbaron.com] >> Gesendet: Donnerstag, 24. Juli 2014 21:24 >> An: qooxdoo Development >> Betreff: [qooxdoo-devel] Resize events and TabView >> >> I have a tabview with a number of pages. Each page has a native component >> that needs to resize as soon as the TabView resizes. I would like to >> implement this behaviour without introducing all kind of flags, but what I'm >> now encountering: >> >> 1) When I register for resize events on tab page level, only the active page >> gets that event. None of he other tab pages get one. >> >> 2) When I register on TabView level, only the active page has actually the >> new size. The "hidden" pages still have the old size until they appear (but >> then there is no resize event it seems). >> >> >> So the only solution I could come up with (please ignore some typing >> mistakes and the typescript syntax): >> >> >> tabView.addListener("resize", () => { >> this.getChildren().forEach((child) => {child.resized = true})); >> }) >> >> >> tabPage.addListener("appear", () => { >> if (this.resize) { >> this.resize = false; >> this.nativeComponent.resize(); >> } >> } >> >> But I guess there is an easier way. Anyone has some tips ? >> >> >> - Peter >> ---------------------------------------------------------------------- >> -------- Want fast and easy access to all the code in your enterprise? >> Index and search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code search >> on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> >> ---------------------------------------------------------------------- >> -------- Want fast and easy access to all the code in your enterprise? >> Index and search up to 200,000 lines of code with a free copy of Black >> Duck Code Sight - the same software that powers the world's largest >> code search on Ohloh, the Black Duck Open Hub! Try it now. >> http://p.sf.net/sfu/bds >> _______________________________________________ >> qooxdoo-devel mailing list >> qooxdoo-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck Code Sight > - the same software that powers the world's largest code search on Ohloh, the > Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > qooxdoo-devel mailing list > qooxdoo-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel