I don't see the problem with flowing layout information down the tree.

David


On Wed, Jan 15, 2014 at 8:55 AM, Ruslan Prokopchuk <fer.ob...@gmail.com>wrote:

> I'm struggling for best solution in the following case:
>
> I have component representing svg node with some content which has to be
> centered in it and having some other properties derived from node
> dimensions. To achieve this I created listener for window resize which
> update state of component with necessary calculations results. In render
> some of them are passed to subcomponents as opts. Subcomponents have their
> own state holding coordinates because of drag support. So, problem is that
> I need these coordinates
>
> 1) snap to some positions
> 2) update app state with ids of that positions
>
> positions coordinates are calculated on window resize in parent component.
>
> I can make all calculations and update in subcomponents render, but this
> is not good, right? Can somebody point me in right direction?
>
> If my description is not specific enough, gist is here:
>
> https://gist.github.com/ul/8436521
>
> P. S. Any comments about bad smelling code which is not covered by
> question also are welcome!
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to