判断鼠标滚动方向
#第一种
return if !$state.is 'public.home'
toolbar = $('.js-article-toolbar')
$scope.oldToolbarPos = 0 if !$scope.oldToolbarPos && $scope.oldToolbarPos != 0
scrollTop = $(_this).scrollTop()
$timeout.cancel $scope.headroomTimer
$scope.headroomTimer = $timeout ->
if scrollTop > $scope.oldToolbarPos
#向上
toolbar.removeClass('slideInDown').addClass('slideOutUp')
else
#向下
toolbar.removeClass('slideOutUp').addClass('slideInDown')
$scope.oldToolbarPos = scrollTop
, 50, false
#第二种
# $(window).on 'mousewheel DOMMouseScroll', (e)->
# console.log '鼠标滚动方向:', e
# if e.originalEvent.wheelDelta #IE 谷歌
# _delta = parseInt e.originalEvent.wheelDelta
# if _delta > 0
# #向上
# console.log '向上', _delta
# else
# #向下
# console.log '向下', _delta
# else if e.originalEvent.detail #火狐
# _delta = parseInt e.originalEvent.detail
# if _delta > 0
# #向上
# console.log '向下', _delta
# else
# #向下
# console.log '向上', _delta