 
   scrollToElement: (el, options = {} ) ->
     win       = @props.windowImpl
-    endPos    = @_desiredTopPosition(el)
+    endPos    = @_desiredTopPosition(el, options)
 
     if options.immediate is true
       win.scroll(0, endPos)


  _onAfterScroll: (el, options) ->
    if el?.classList?.contains('target-scroll')
      _.delay(el.classList.remove.bind(el.classList, 'target-scroll'), 150)
    @props.windowImpl.history.pushState(null, null, "##{el.id}") if options.updateHistory
    @onAfterScroll?(el)



    startPos  = win.pageYOffset
    startTime = Date.now()
    duration  = result(@, 'getScrollDuration', DEFAULT_DURATION)
    requestAnimationFrame = win.requestAnimationFrame or delay
    options.attemptNumber ||= 0

    step = =>
