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

react-grid-gallery

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-grid-gallery - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

5

CHANGELOG.md
# react-grid-gallery
### v0.1.13 / 2016-08-22
* Replaced legacy ref string with ref callback. Fixes unsupported stringy ref issue when using [react-grid-gallery](https://github.com/benhowell/react-grid-gallery) inside a [reagent](https://github.com/reagent-project/reagent) project :)
### v0.1.12 / 2016-08-22

@@ -9,3 +13,2 @@

### v0.1.11 / 2016-08-21

@@ -12,0 +15,0 @@

23

lib/Gallery.js

@@ -24,5 +24,3 @@ 'use strict';

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
//import ReactDOM from 'react-dom';
var update = require('react-addons-update');

@@ -71,7 +69,3 @@

value: function componentDidUpdate() {
//if (ReactDOM.findDOMNode(this).clientWidth
// !== this.state.containerWidth){
// this.handleResize();
//}
if (this.refs.gallery.clientWidth !== this.state.containerWidth) {
if (this._gallery.clientWidth !== this.state.containerWidth) {
this.handleResize();

@@ -84,4 +78,3 @@ }

this.setState({
containerWidth: Math.floor(this.refs.gallery.clientWidth)
//Math.floor(ReactDOM.findDOMNode(this).clientWidth)
containerWidth: Math.floor(this._gallery.clientWidth)
});

@@ -207,4 +200,4 @@ }

}, {
key: 'renderGallery',
value: function renderGallery() {
key: 'renderImages',
value: function renderImages() {
if (!this.props.images) return;

@@ -241,6 +234,10 @@ if (this.state.containerWidth == 0) return;

value: function render() {
var _this2 = this;
return _react2.default.createElement(
'div',
{ id: 'Gallery', ref: 'gallery' },
this.renderGallery(),
{ id: 'Gallery', ref: function ref(c) {
return _this2._gallery = c;
} },
this.renderImages(),
_react2.default.createElement(_reactImages2.default, {

@@ -247,0 +244,0 @@ images: this.props.images,

{
"name": "react-grid-gallery",
"version": "0.1.12",
"version": "0.1.13",
"description": "Justified gallery component for React.",

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

@@ -40,3 +40,3 @@ import React, { Component, PropTypes } from 'react';

componentDidUpdate () {
if (this.refs.gallery.clientWidth
if (this._gallery.clientWidth
!== this.state.containerWidth){

@@ -50,3 +50,3 @@ this.handleResize();

containerWidth:
Math.floor(this.refs.gallery.clientWidth)
Math.floor(this._gallery.clientWidth)
});

@@ -172,3 +172,3 @@ }

renderGallery () {
renderImages () {
if (!this.props.images) return;

@@ -208,4 +208,4 @@ if (this.state.containerWidth == 0) return;

return (
<div id="Gallery" ref="gallery">
{this.renderGallery()}
<div id="Gallery" ref={(c) => this._gallery = c}>
{this.renderImages()}
<Lightbox

@@ -212,0 +212,0 @@ images={this.props.images}

Sorry, the diff of this file is too big to display

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