2016-07-19 131 views
0

在FramerJS中使用是否是真實的 - 在頁面上用刷子滑動內容的垂直滾動? 例如: 1.我在Sketch中帶有2個面組。 2.這些組被導入到FramerJS 3.每個包裝在成幀器中的組垂直滾動添加 4.我可以使用這些圖層與水平掃動的頁面的包裝組?FramerJS - 用頁面滑動頁面內容的垂直滾動

是否可以通過水平滑動在頁面上進行內容垂直滾動?

有沒有人有一個例子? 。:(

回答

1

是的,這是可能的,你可以在PageComponent包裹ScrollComponent層下面是一些示例代碼,您開始:

# This page component holds the horizontally aligned pages 
pageComponent = new PageComponent 
    y: sketch.navigationBar.height 
    height: Screen.height - sketch.navigationBar.height 
    width: Screen.width 
    # The scroll direction is restricted to only allow for horizontal scrolling 
    scrollVertical: false 
    # The direction lock is enabled to only allow either horizontal or vertical scrolling 
    directionLock: true 

for pageIndex in [0...3] 

    # A scroll component is created 
    scrollComponent = new ScrollComponent 
     size: pageComponent.size 
     x: pageIndex * pageComponent.width 
     contentInset: bottom: 40 
     # Only vertical scrolling is allowed and the direction is locked 
     scrollHorizontal: false 
     directionLock: true 

這是從成幀器JS網站畫廊中的應用實例:

http://framerjs.com/gallery/preview/#medium-app.framer