       (scope, element, attr) ->
         actor = rekapi.addActor({ context: element[0] })
         y = 0
+        prevScrollY = 0
         scrollY = 0
         animationFrame = new AnimationFrame()
         updating = false

                actionProp.down.apply(c) if actionProp.down

              actionFrameIdx = ++idx


        actionsUpdate = _.debounce(actionsUpdate, 33, {leading: true, maxWait: 33})


        actionsUpdate = ->

          d = scrollY - prevScrollY

          if d<0 and actionFrameIdx >= 0  # scroll up: don't apply on page load (only apply on page load for downward movement)
            idx = if (actionFrameIdx >= actionFrames.length) then actionFrameIdx-1 else actionFrameIdx
