Skip to content

Instantly share code, notes, and snippets.

@sueLan
Created March 5, 2020 13:33
Show Gist options
  • Save sueLan/2c97ddc32a28cf59b4addb2adac0af8b to your computer and use it in GitHub Desktop.
Save sueLan/2c97ddc32a28cf59b4addb2adac0af8b to your computer and use it in GitHub Desktop.
this._viewableIndices = viewableIndices;
if (this._config.minimumViewTime) {
const handle = setTimeout(() => {
this._timers.delete(handle);
this._onUpdateSync(
viewableIndices,
onViewableItemsChanged,
createViewToken,
);
}, this._config.minimumViewTime);
this._timers.add(handle);
} else {
this._onUpdateSync(
viewableIndices,
onViewableItemsChanged,
createViewToken,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment