Hmmm. You could use core.async, pass down a channel to children, and pass up an 
event each time the child is mounted. The parent would start a go-loop on 
initialization, count the children, and run some code when it gets the right 
number of child-mounting events. You could also use a general event bus for 
something similar, if you have one.

Other options I can think of involve passing down a callback or a local state 
"mounting count" atom for the children to call/inc.

But really, unless you're doing something very complicated, layout is more the 
province of CSS. Could the Flexbox layout work here?

Matthew

On Friday, March 6, 2015 at 10:15:23 AM UTC-5, James Reeves wrote:
> On 6 March 2015 at 05:22, Dave Della Costa <ddell...@gmail.com> wrote:
> (cc'ing clojur...@googlegroups.com)
> 
> 
> Let me make sure I understand what you're asking: you have a parent
> 
> enclosing component that has to do calculations to position a set of
> 
> child component element, but you can only properly calculate positioning
> 
> for those child elements (in the parent?) after you get offset position
> 
> information for each one, once they have mounted?
> 
> 
> 
> Yes, but it's the size of the child elements I need. They contain text, so I 
> don't know their dimensions until they've been rendered.
> 
> 
> 
> Essentially the parent needs to adjust the position of its children so that 
> none overlap.
> 
> 
> - James

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to