Skip to content

Commit

Permalink
children, not descendants...
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas authored and Andreas committed Mar 31, 2016
1 parent 773938e commit 8b689ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ViewController.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class module.exports extends Layer

# unless user changed .scroll setting, add a scrollComponent
if @scroll
descendants = newView.descendants
children = newView.children
scrollComponent = new ScrollComponent
name: "scrollComponent"
width: @width
Expand All @@ -86,8 +86,8 @@ class module.exports extends Layer
scrollComponent.scrollHorizontal = false
if newView.height <= @height
scrollComponent.scrollVertical = false
for d in descendants
d.parent = scrollComponent.content
for c in children
c.parent = scrollComponent.content
newView.scrollComponent = scrollComponent # make it accessible as a property

# defaults
Expand Down

0 comments on commit 8b689ad

Please sign in to comment.