2016-07-19 4 views
0

スワイプでページ上のコンテンツの垂直スクロールをFramerJSで使用するのは本当ですか? 例: 1.マスク付きスケッチに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

関連する問題