Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

questions about anchorChildren
Started by mark_steelman Dec 30 2013 01:52 PM

26 replies to this topic
graphics 2.0
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

kilopop

[GLOBAL: userInfoPane.html]
kilopop
  • Contributor

  • 257 posts
  • Corona SDK

Nice work Ingemar, you've found a work around so at least nesting is possible :) .. albeit involving a great deal more calculation... :( But yes, good idea to actually not use anchor = true as it is unpredictable, not a great word when it comes to coding. The way we work, it isn't intuitive to set layers at 0,0 as a number of things need to be laid out in relation to each other. I guess what's needed is to set graphic layers out as usual, then pass them through a function if another anchor is required other than 0.5, 0.5 which sets obj.y, obj.x to 0,0, sets a passed in anchor then returns an adjusted x and y according to the new anchor and the original x and y.. Hmmm could be doable. Doing the same for groups is difficult. Maybe calculate where a group is according to where the average of the group's children are in x and y? Again a bit of code here required to get back what we lost in G1 Glad to have identified the corrupt nature of anchorChildren at the beginning of a big project rather than half way through. As for the already completed apps with heavy group nesting.. that's another painful story. Nice work Ingemar.

[TOPIC: post.html]
#27

kilopop

[GLOBAL: userInfoPane.html]
kilopop
  • Contributor

  • 257 posts
  • Corona SDK

Have started a new thread to focus on the evolution of this code to make nested groups work again:

http://forums.coronalabs.com/topic/46954-solution-to-fix-nested-groups-in-g20/




[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]