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

Don't resize the inner div if an axis is turned off. #36

Closed tcoulter closed 11 years ago

tcoulter commented 11 years ago

I found that when you turned an axis off using the {x: false} or {y: false} options, the scrollbar wouldn't scroll the inner div completely. In my case this was because the div was unnecessarily resized; I assume this is the case for everybody else. Here's a pull request fixing it.

rauchg commented 11 years ago

Shouldn't we have false !== this.x

tcoulter commented 11 years ago

Which line? You have that on line 36 normalizing this.x to a boolean. There's no need to check for false explicitly since you know the only two values it can be is either true or false.

However, I'm not against being more explicit if you'd like to be. The functionality is the same.

On Sun, Nov 4, 2012 at 12:13 PM, Guillermo Rauch notifications@github.comwrote:

Shouldn't we have false !== this.x

— Reply to this email directly or view it on GitHubhttps://github.com/LearnBoost/antiscroll/pull/36#issuecomment-10052739.

rauchg commented 11 years ago

No, that's perfect then!

On Sun, Nov 4, 2012 at 11:35 AM, Tim Coulter notifications@github.comwrote:

Which line? You have that on line 36 normalizing this.x to a boolean. There's no need to check for false explicitly since you know the only two values it can be is either true or false.

However, I'm not against being more explicit if you'd like to be. The functionality is the same.

On Sun, Nov 4, 2012 at 12:13 PM, Guillermo Rauch notifications@github.comwrote:

Shouldn't we have false !== this.x

— Reply to this email directly or view it on GitHub< https://github.com/LearnBoost/antiscroll/pull/36#issuecomment-10052739>.

— Reply to this email directly or view it on GitHubhttps://github.com/LearnBoost/antiscroll/pull/36#issuecomment-10054365.

Guillermo Rauch LearnBoost CTO http://devthought.com

arlm commented 11 years ago

@tcoulter I have merged your fix on my branch after my pull-request is accepted I can do another one here with your fixes.