Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-photo-gallery

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-photo-gallery - npm Package Compare versions

Comparing version 4.2.12 to 4.2.13

5

package.json
{
"name": "react-photo-gallery",
"version": "4.2.12",
"version": "4.2.13",
"description": "Responsive React Photo Gallery Component",

@@ -28,4 +28,3 @@ "main": "lib/Gallery.js",

"react-component-gulp-tasks": "^0.7.0",
"react": "~15.3.0",
"react-dom": "~15.3.0"
"react": "~15.3.0"
},

@@ -32,0 +31,0 @@ "peerDependencies": {

2

README.md
# React Responsive Photo Gallery
[![Join the chat at https://gitter.im/react-photo-gallery/Lobby](https://badges.gitter.im/react-photo-gallery/Lobby.svg)](https://gitter.im/react-photo-gallery/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
A responsive React photo gallery component.

@@ -3,0 +5,0 @@

import React from 'react';
import ReactDOM from 'react-dom';
import Lightbox from 'react-images';

@@ -19,8 +18,8 @@

componentDidMount(){
this.setState({containerWidth: Math.floor(ReactDOM.findDOMNode(this).clientWidth)})
this.setState({containerWidth: Math.floor(this._gallery.clientWidth)})
window.addEventListener('resize', this.handleResize);
}
componentDidUpdate(){
if (ReactDOM.findDOMNode(this).clientWidth !== this.state.containerWidth){
this.setState({containerWidth: Math.floor(ReactDOM.findDOMNode(this).clientWidth)});
if (this._gallery.clientWidth !== this.state.containerWidth){
this.setState({containerWidth: Math.floor(this._gallery.clientWidth)});
}

@@ -32,3 +31,3 @@ }

handleResize(e){
this.setState({containerWidth: Math.floor(ReactDOM.findDOMNode(this).clientWidth)});
this.setState({containerWidth: Math.floor(this._gallery.clientWidth)});
}

@@ -115,3 +114,3 @@ openLightbox(index, event){

return(
<div id="Gallery" className="clearfix">
<div id="Gallery" className="clearfix" ref={(c) => this._gallery = c}>
{photoPreviewNodes}

@@ -123,3 +122,3 @@ </div>

return(
<div id="Gallery" className="clearfix">
<div id="Gallery" className="clearfix" ref={(c) => this._gallery = c}>
{photoPreviewNodes}

@@ -126,0 +125,0 @@ <Lightbox

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc