Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove requestAnimationFrame polyfill #212

Merged
merged 1 commit into from
Jul 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ For full feature set have a look at prop definitions of [RecyclerListView](https
* **[Sample Code](https://github.com/Flipkart/recyclerlistview/tree/master/docs/guides/samplecode)**
* **[Performance](https://github.com/Flipkart/recyclerlistview/tree/master/docs/guides/performance)**
* **Web Support:** Works with React Native Web out of the box. For use with ReactJS start importing from `recyclerlistview/web` e.g., `import { RecyclerListView } from "recyclerlistview/web"`. Use aliases if you want to preserve import path. Only platform specific code is part of the build so, no unnecessary code will ship with your app.
* **Polyfills Needed:** `requestAnimationFrame`

## License
**[Apache v2.0](https://github.com/Flipkart/recyclerlistview/blob/master/LICENSE.md)**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "recyclerlistview",
"version": "1.4.0-beta.7",
"version": "1.4.0-beta.9",
"description": "The listview that you need and deserve. It was built for performance, uses cell recycling to achieve smooth scrolling.",
"main": "dist/reactnative/index.js",
"types": "dist/reactnative/index.d.ts",
Expand Down
5 changes: 2 additions & 3 deletions src/core/ProgressiveListView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import RecyclerListView, { RecyclerListViewProps, RecyclerListViewState } from "./RecyclerListView";
import { pRequestAnimationFrame, pCancelAnimationFrame } from "../utils/JavascriptPolyfill";
export interface ProgressiveListViewProps extends RecyclerListViewProps {
maxRenderAhead?: number;
renderAheadStep?: number;
Expand All @@ -25,7 +24,7 @@ export default class ProgressiveListView extends RecyclerListView<ProgressiveLis

private updateRenderAheadProgessively(newVal: number): void {
this.cancelRenderAheadUpdate(); // Cancel any pending callback.
this.renderAheadUdpateCallbackId = pRequestAnimationFrame(() => {
this.renderAheadUdpateCallbackId = requestAnimationFrame(() => {
if (!this.updateRenderAheadOffset(newVal)) {
this.updateRenderAheadProgessively(newVal);
} else {
Expand All @@ -51,7 +50,7 @@ export default class ProgressiveListView extends RecyclerListView<ProgressiveLis

private cancelRenderAheadUpdate(): void {
if (this.renderAheadUdpateCallbackId) {
pCancelAnimationFrame(this.renderAheadUdpateCallbackId);
cancelAnimationFrame(this.renderAheadUdpateCallbackId);
}
}
}
7 changes: 0 additions & 7 deletions src/utils/JavascriptPolyfill.ts

This file was deleted.