-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Rewrote a lot of the Scrollable logic so that it's more performant. No need for the throttling. - Moved all the scrollable logic into one behavior instead of scattered. - Rewrote large chunks of slidingRender to be more performant and fix a few trailing bugs.
- Loading branch information
Showing
18 changed files
with
267 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
define({ | ||
// Inspired by: https://gist.github.com/danro/7846358 | ||
// Leverage requestAnimationFrame for throttling function calls instead of setTimeout for better perf. | ||
throttleFramerate: function(callback) { | ||
var wait, args, context; | ||
return function() { | ||
if (wait) return; | ||
wait = true; | ||
args = arguments; | ||
context = this; | ||
requestAnimationFrame(function() { | ||
wait = false; | ||
callback.apply(context, args); | ||
}); | ||
}; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.