Permalink
Browse files

Example fix for scroll wrap if we don't know scroll size

  • Loading branch information...
koenbok committed Apr 7, 2015
1 parent 16520a3 commit bf78d4f432862c97514bafb4b7c6da4d9db4b113
Showing with 14 additions and 0 deletions.
  1. +14 −0 framer/Components/ScrollComponent.coffee
@@ -385,6 +385,20 @@ class exports.ScrollComponent extends Layer
for propKey in ["frame", "image", "name"]
scroll[propKey] = layer[propKey]
# This could potentially be smart to avoid an unexpected state if
# you forgot to add a mask in sketch or photoshop and the scroll
# component size becomes the same as it's content.
# https://github.com/motif/Company/issues/208
# screenFrame = scroll.screenFrame
# if screenFrame.y + screenFrame.height > Screen.height
# scroll.height = Screen.height - screenFrame.y
# if screenFrame.x + screenFrame.width > Screen.width
# scroll.width = Screen.width - screenFrame.x
for subLayer in layer.subLayers
subLayerIndex = subLayer.index

0 comments on commit bf78d4f

Please sign in to comment.