Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Better error for scroll component
- Loading branch information
Showing
with
1 addition
and
1 deletion.
-
+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} |
|
|