   constructor: (@start) ->
     cur_elem = @start
     while cur_elem
-      if Math.abs(@compare cur_elem) > 5 and elligible cur_elem
-#         console.log 'found:', cur_elem
+      if Math.abs(@compare cur_elem) > 5 #and elligible cur_elem
+        console.log "#{@desc}.found:", cur_elem if DBG_SHOW_FOUND
         @elem = cur_elem
         return
       else
         cur_elem = cur_elem.parentElement
     # none found: nothing scrollable: just override with a mock
+    console.log "#{@desc}.found:none" if DBG_SHOW_FOUND
 #     @scroll = (dist) -> 0
 #     @scrollable = false
     @scroll = @fallback

# License: MIT
# Author: Maartyl (c) 2016
# VERSION: 1.0.0

# keeps track of last MAX positions and derivations, to compute overscroll
class Buf

  compare: (e) -> e.scrollLeftMax ##e.scrollWidth - e.clientWidth #0 if same
  scroll: (dist) => @elem.scrollLeft+=dist #auto manages bounds
  fallback: (dist) -> window.scrollBy(dist, 0)
  desc: 'X'
class ScrollerY extends Scroller
  compare: (e) -> e.scrollTopMax ##e.scrollHeight - e.clientHeight #0 if same
  scroll: (dist) => @elem.scrollTop+=dist
  fallback: (dist) -> window.scrollBy(0, dist)
  desc:'Y'

# exists for a single drag
class Dragger
