Socket
Socket
Sign inDemoInstall

react-masonry-layout

Package Overview
Dependencies
7
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.2.2

15

lib/components/InfiniteScroll.js

@@ -27,6 +27,9 @@ 'use strict';

function I() {
function I(props) {
_classCallCheck(this, I);
return _possibleConstructorReturn(this, Object.getPrototypeOf(I).apply(this, arguments));
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(I).call(this, props));
_this.handleScroll = _this.handleScroll.bind(_this);
return _this;
}

@@ -42,5 +45,5 @@

if (infiniteScrollContainer === 'window') {
window.addEventListener('scroll', this.handleScroll.bind(this));
window.addEventListener('scroll', this.handleScroll);
} else {
document.getElementById(infiniteScrollContainer).addEventListener('mousewheel', this.handleScroll.bind(this));
document.getElementById(infiniteScrollContainer).addEventListener('mousewheel', this.handleScroll);
}

@@ -57,5 +60,5 @@ }

if (infiniteScrollContainer === 'window') {
window.removeEventListener('scroll', this.handleScroll.bind(this));
window.removeEventListener('scroll', this.handleScroll);
} else {
document.getElementById(infiniteScrollContainer).addEventListener('mousewheel', this.handleScroll.bind(this));
document.getElementById(infiniteScrollContainer).removeEventListener('mousewheel', this.handleScroll);
}

@@ -62,0 +65,0 @@ }

2

package.json
{
"name": "react-masonry-layout",
"version": "0.2.1",
"version": "0.2.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -29,2 +29,7 @@ import React, { PropTypes, Component } from 'react'

constructor(props) {
super(props)
this.handleScroll = this.handleScroll.bind(this)
}
componentDidMount() {

@@ -36,10 +41,9 @@ if (!this.props.infiniteScrollDisabled) {

if (infiniteScrollContainer === 'window') {
window.addEventListener('scroll', ::this.handleScroll)
window.addEventListener('scroll', this.handleScroll)
} else {
document
.getElementById(infiniteScrollContainer)
.addEventListener('mousewheel', ::this.handleScroll)
.addEventListener('mousewheel', this.handleScroll)
}
}

@@ -54,7 +58,7 @@ }

if (infiniteScrollContainer === 'window') {
window.removeEventListener('scroll', ::this.handleScroll)
window.removeEventListener('scroll', this.handleScroll)
} else {
document
.getElementById(infiniteScrollContainer)
.addEventListener('mousewheel', ::this.handleScroll)
.removeEventListener('mousewheel', this.handleScroll)
}

@@ -61,0 +65,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc