Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Example fix for scroll wrap if we don't know scroll size
- Loading branch information
Showing
with
14 additions
and
0 deletions.
-
+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 |
|
|