【问题标题】:Listen to famous-angular scroll view收听著名的角度滚动视图
【发布时间】:2014-09-20 01:29:03
【问题描述】:

有没有办法在触摸设备上监听famous-angularfa-scroll-view 滚动事件?

例如,就在著名的 angular 文档中:

<fa-app ng-controller="ScrollCtrl">
  <!-- fa-scroll-view receives all events from $scope.myEventHandler, and decides how to handle them -->
  <fa-scroll-view fa-pipe-from="myEventHandler">
      <fa-view ng-repeat="view in views">
        <fa-modifier fa-size="[undefined, 160]">
        <!-- All events on fa-surfaces (click, mousewheel) are piped to $scope.myEventHandler -->
           <fa-surface fa-background-color="view.color"
                        fa-pipe-to="myEventHandler">
           </fa-surface>
          </fa-modifier>
      </fa-view>
  </fa-scroll-view>
</fa-app>

我可以通过

收听myEventHandler上的点击
$scope.myEventHandler.on('click', ...)

但不是滚动

$scope.myEventHandler.on('scroll', ...) // doesn't fire

这可能吗?

谢谢。

【问题讨论】:

    标签: famo.us famous-angular


    【解决方案1】:

    $ Famous.find('fa-scroll-view')[0].renderNode.sync.on('start', function(event) { console.log('start'); }); 还有“更新”和“结束”事件

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多