Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_mount(viewer) {
if (!viewer || this._viewer) {
return;
}
this._viewer = viewer;
const {
isOverflowScroll,
isEqualSize,
isConstantSize,
horizontal,
threshold,
} = this.props;
this._items = new ItemManager();
this._renderer = new DOMRenderer(viewer, {
container: isOverflowScroll ? this._container : null,
isEqualSize,
isConstantSize,
horizontal,
});
this._watcher = new Watcher(
this._renderer.view,
{
isOverflowScroll,
horizontal,
container: this._renderer.container,
resize: () => setTimeout(() => { this.setState({ layout: true }); }),
check: param => this._onCheck(param),
});
this._infinite = new Infinite(this._items, {