Permalink
Browse files

Better error for scroll component

  • Loading branch information...
Koen Bok
Koen Bok committed Feb 8, 2016
1 parent 094286c commit 0564c0e46657bfd5c3f65d33b8b84587a83f8f6f
Showing with 1 addition and 1 deletion.
  1. +1 −1 framer/Components/ScrollComponent.coffee
@@ -268,7 +268,7 @@ class exports.ScrollComponent extends Layer
scrollToLayer: (contentLayer, originX=0, originY=0, animate=true, animationOptions={curve:"spring(500,50,0)"}) ->
if contentLayer and contentLayer.parent isnt @content
throw Error("This layer is not in the scroll component content")
throw Error("Can't scroll to this layer because it's not in the ScrollComponent. Add it to the content like layer.parent = scroll.content.")
if not contentLayer or @content.children.length == 0
scrollPoint = {x:0, y:0}

0 comments on commit 0564c0e

Please sign in to comment.