Skip to content

Commit

Permalink
Use requestAnimationFrame and CSS 2d transforms if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Krister Kari committed Oct 25, 2013
1 parent 337ac9b commit 7432db5
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 8 deletions.
46 changes: 42 additions & 4 deletions bin/javascripts/jquery.nanoscroller.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

9 comments on commit 7432db5

@satazor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a new version? :D

@kristerkari
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@satazor yes, I just wanted to give people some time to test it before releasing a new version :)

@satazor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I will be testing it out and report any bug

@satazor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If found a bug when scrolling with the draggable. It behaves strangely. Reverting back solved it.

@satazor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a minor suggestion regarding raf.

https://github.com/jamesflorentino/nanoScrollerJS/blob/master/bin/javascripts/jquery.nanoscroller.js#L470

If there's a pending raf, you should not request another one.
Also, when we call stop or destroy, the pending raf should be canceled with window.cancelAnimationFrame().

@kristerkari
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll make those changes.

@kristerkari
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If found a bug when scrolling with the draggable. It behaves strangely. Reverting back solved it

@satazor Could you open a bug report for this?

@kristerkari
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@satazor I did some fixes based on your suggestions and fixed that dragging bug. Could take the latest code and test it out?

@satazor
Copy link
Contributor

@satazor satazor commented on 7432db5 Nov 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created #196, which describes the bug.

Please sign in to comment.