Automattic / antiscroll

OS X Lion style cross-browser native scrolling on the web that gets out of the way.
1.07k stars 162 forks source link

Add a Minimum scroller height/width #33

Open Radagaisus opened 11 years ago

Radagaisus commented 11 years ago

See this screenshot. That tiny little black thing at the right side is antiscroll.

A simple fix is to add a minimal height, and adjust the top position based on it:

//  Scrollbar.Vertical.prototype.update

height = trackHeight * paneHeight / innerEl.scrollHeight
top = trackHeight * innerEl.scrollTop / innerEl.scrollHeight

if height < 30
  top = top - (30 - height)
  height = 30

this.el
      .css('height', height)
      .css('top', top)

Minimum height should probably be an option, as well.

arlm commented 11 years ago

Please, do the fix on a branch of yours and do a pull request or post a diff.

Radagaisus commented 11 years ago

@arlm it's on my task list :)

arlm commented 11 years ago

I have merged a lot of code into my antiscroll fork and it contemplates a portion of code to set the minimum size to 20. Take a look on it and when my pull request is accepted/merged we can close this issue, IMHO.