This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Jon Doe
Posted Dec 02 - Read on Facebook

I am having the hardest time figuring out why I can't get children to work...

childrenofcampaigns = campaigns.children

childrenofcampaigns.visible = false

has no effect whatsoever on the children of that layer I'm using sketch and have the groups in groups etc.. denoting that they are children in sketch. Am I missing something?

another example -

childrenLayers = sketch.campaign_list_menu_open.children
childrenLayers.onMouseOver ->
this.children[0].opacity = 1


Malcolm Ellis

From what you've posted it looks like you need to set the visibility of a child element while looping through the children array. For example,
for child in campaigns.children
child.visible = false

Malcolm Ellis

... mind the indenting of that example

George Kedenburg III

Yes the children property is purely just an array (programming term for list) of the children of that layer. You'll need to use a loop like Malcolm suggested to actually do something to those children.

Gregory J. Orton

There are laws against making children work... I'll get my coat.

Read the entire post on Facebook