Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scroll lock now works correct with Page component
- Loading branch information
J.P.P Treub
authored and
J.P.P Treub
committed
Jul 21, 2015
1 parent
9e98ef0
commit 8972740
Showing
34 changed files
with
722 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
31 changes: 31 additions & 0 deletions
31
test/studio/PageComponentLockHorizontalDirectionExceptTopRow.framer/app.coffee
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,31 @@ | |||
horizontalPages = 3 | |||
verticalPages = 4 | |||
|
|||
pageComp = new PageComponent | |||
size: Screen.size | |||
directionLock: true | |||
|
|||
verticalPCs = [] | |||
|
|||
for horizontalPageIndex in [0...horizontalPages] | |||
for verticalPageIndex in [0...verticalPages] | |||
page = new Layer | |||
x: horizontalPageIndex * Screen.width | |||
y: verticalPageIndex * Screen.height | |||
size: Screen.size | |||
backgroundColor: "#28affa" | |||
superLayer: pageComp.content | |||
html: "#{horizontalPageIndex}:#{verticalPageIndex}" | |||
style: | |||
lineHeight: "#{Screen.height}px" | |||
textAlign: "center" | |||
fontSize: "240px" | |||
fontWeight: "100" | |||
fontFamily: "Helvetica Neue" | |||
|
|||
pageComp.on Events.Move, (scrollOffset) -> | |||
if scrollOffset.y == 0 | |||
pageComp.scrollHorizontal = true | |||
else | |||
if pageComp.scrollHorizontal | |||
pageComp.scrollHorizontal = false |
12 changes: 12 additions & 0 deletions
12
test/studio/PageComponentLockHorizontalDirectionExceptTopRow.framer/framer/coffee-script.js
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
test/studio/PageComponentLockHorizontalDirectionExceptTopRow.framer/framer/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,10 @@ | |||
{ | |||
"device" : "iPhone 5S Space Gray", | |||
"sharedPrototype" : 1, | |||
"deviceOrientation" : 0, | |||
"contentScale" : 1, | |||
"deviceType" : "fullscreen", | |||
"updateDelay" : 0.3, | |||
"deviceScale" : -1, | |||
"delay" : 0.3 | |||
} |
Oops, something went wrong.